From 4223a0a719806af86083997445c48077b094c5a2 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Tue, 29 Aug 2023 16:17:00 +0200 Subject: [PATCH 1/5] removed events from all public facing places --- app/src/main/AndroidManifest.xml | 62 ------------------- .../other/generic/drawer/DrawerMenuHelper.kt | 3 - app/src/main/res/drawable/ic_celebration.xml | 21 ------- app/src/main/res/values-de/strings.xml | 1 - app/src/main/res/values/strings.xml | 1 - app/src/main/res/xml/settings.xml | 16 ----- 6 files changed, 104 deletions(-) delete mode 100644 app/src/main/res/drawable/ic_celebration.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1895cfef0..2f547bd80 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -529,68 +529,6 @@ - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/java/de/tum/in/tumcampusapp/component/other/generic/drawer/DrawerMenuHelper.kt b/app/src/main/java/de/tum/in/tumcampusapp/component/other/generic/drawer/DrawerMenuHelper.kt index 49d17bd3d..1df54ac60 100644 --- a/app/src/main/java/de/tum/in/tumcampusapp/component/other/generic/drawer/DrawerMenuHelper.kt +++ b/app/src/main/java/de/tum/in/tumcampusapp/component/other/generic/drawer/DrawerMenuHelper.kt @@ -75,8 +75,6 @@ class DrawerMenuHelper( englishContext.getString(GENERAL[3].titleRes) to GENERAL[3], germanContext.getString(GENERAL[4].titleRes) to GENERAL[4], englishContext.getString(GENERAL[4].titleRes) to GENERAL[4], - germanContext.getString(GENERAL[5].titleRes) to GENERAL[5], - englishContext.getString(GENERAL[5].titleRes) to GENERAL[5], // ABOUT germanContext.getString(ABOUT[0].titleRes) to ABOUT[0], englishContext.getString(ABOUT[0].titleRes) to ABOUT[0], @@ -196,7 +194,6 @@ class DrawerMenuHelper( NavItem.FragmentDestination(R.string.menues, R.drawable.ic_cutlery, CafeteriaFragment::class.java), NavItem.FragmentDestination(R.string.study_rooms, R.drawable.ic_outline_group_work_24px, StudyRoomsFragment::class.java), NavItem.FragmentDestination(R.string.news, R.drawable.ic_rss, NewsFragment::class.java), - NavItem.FragmentDestination(R.string.events_tickets, R.drawable.tickets, EventsFragment::class.java), NavItem.FragmentDestination(R.string.barrier_free, R.drawable.ic_outline_accessible_24px, BarrierFreeInfoFragment::class.java), NavItem.FragmentDestination( R.string.opening_hours, diff --git a/app/src/main/res/drawable/ic_celebration.xml b/app/src/main/res/drawable/ic_celebration.xml deleted file mode 100644 index 10ceb0829..000000000 --- a/app/src/main/res/drawable/ic_celebration.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 9f49168e2..e3be61a68 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -344,7 +344,6 @@ Erlaubt dir dich mit TUMOnline zu verbinden Schlägt ausgewählte News vor Benachrichtigt dich über neue Nachrichten - Zeigt anstehenden Events an Gibt eine Übersicht über neue Features Karte anpassen Karte immer ausblenden diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 59e294e49..84f6ace96 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -413,7 +413,6 @@ Allows you to connect to TUMOnline Advertises selected news Notifies you about new messages - Shows upcoming events Provides an overview about new features Chat Open card settings diff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml index 905ba5033..1e9a9d44e 100644 --- a/app/src/main/res/xml/settings.xml +++ b/app/src/main/res/xml/settings.xml @@ -399,22 +399,6 @@ - - - - - - - - - Date: Tue, 29 Aug 2023 16:34:28 +0200 Subject: [PATCH 2/5] removed unused import --- .../component/other/generic/drawer/DrawerMenuHelper.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/de/tum/in/tumcampusapp/component/other/generic/drawer/DrawerMenuHelper.kt b/app/src/main/java/de/tum/in/tumcampusapp/component/other/generic/drawer/DrawerMenuHelper.kt index 1df54ac60..e5b14788f 100644 --- a/app/src/main/java/de/tum/in/tumcampusapp/component/other/generic/drawer/DrawerMenuHelper.kt +++ b/app/src/main/java/de/tum/in/tumcampusapp/component/other/generic/drawer/DrawerMenuHelper.kt @@ -23,7 +23,6 @@ import de.tum.`in`.tumcampusapp.component.ui.overview.InformationActivity import de.tum.`in`.tumcampusapp.component.ui.overview.MainFragment import de.tum.`in`.tumcampusapp.component.ui.search.SearchFragment import de.tum.`in`.tumcampusapp.component.ui.studyroom.StudyRoomsFragment -import de.tum.`in`.tumcampusapp.component.ui.ticket.activity.EventsFragment import de.tum.`in`.tumcampusapp.utils.Const import de.tum.`in`.tumcampusapp.utils.Utils import de.tum.`in`.tumcampusapp.utils.allItems From 11153481b1230bc1fbfed451aab1fed671c70f36 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Tue, 29 Aug 2023 16:45:42 +0200 Subject: [PATCH 3/5] Removed the `eventsComponent()` and `ticketsComponent()` from the AppComponentto make the build succeed again --- .../component/ui/ticket/activity/BuyTicketActivity.kt | 5 ----- .../component/ui/ticket/activity/ShowTicketActivity.kt | 4 ---- .../ui/ticket/fragment/EventDetailsFragment.kt | 9 --------- .../component/ui/ticket/fragment/EventsListFragment.kt | 10 ---------- .../java/de/tum/in/tumcampusapp/di/AppComponent.kt | 4 ---- .../tum/in/tumcampusapp/service/di/DownloadModule.kt | 2 -- 6 files changed, 34 deletions(-) diff --git a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/activity/BuyTicketActivity.kt b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/activity/BuyTicketActivity.kt index 293810beb..7f4a273bb 100644 --- a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/activity/BuyTicketActivity.kt +++ b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/activity/BuyTicketActivity.kt @@ -82,11 +82,6 @@ class BuyTicketActivity : BaseActivity(R.layout.activity_buy_ticket), TicketAmou binding.totalPriceTextView.text = Utils.formatPrice(0) - injector.ticketsComponent() - .eventId(eventId) - .build() - .inject(this) - // Get ticket type information from API val disposable = ticketsRemoteRepo.fetchTicketTypesForEvent(eventId) .subscribeOn(Schedulers.io()) diff --git a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/activity/ShowTicketActivity.kt b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/activity/ShowTicketActivity.kt index f92319fba..8072b32bc 100644 --- a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/activity/ShowTicketActivity.kt +++ b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/activity/ShowTicketActivity.kt @@ -74,10 +74,6 @@ class ShowTicketActivity : BaseActivity(R.layout.activity_show_ticket) { setContentView(binding.root) val eventId = intent.getIntExtra(Const.KEY_EVENT_ID, 0) - injector.ticketsComponent() - .eventId(eventId) - .build() - .inject(this) initViews() loadTicketData(eventId) diff --git a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventDetailsFragment.kt b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventDetailsFragment.kt index b9cb0c361..4be4e47c8 100644 --- a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventDetailsFragment.kt +++ b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventDetailsFragment.kt @@ -22,7 +22,6 @@ import de.tum.`in`.tumcampusapp.component.ui.ticket.model.Event import de.tum.`in`.tumcampusapp.component.ui.ticket.payload.TicketStatus import de.tum.`in`.tumcampusapp.databinding.FragmentEventDetailsBinding import de.tum.`in`.tumcampusapp.di.ViewModelFactory -import de.tum.`in`.tumcampusapp.di.injector import de.tum.`in`.tumcampusapp.utils.Const import de.tum.`in`.tumcampusapp.utils.Const.KEY_EVENT_ID import de.tum.`in`.tumcampusapp.utils.DateTimeUtils @@ -51,14 +50,6 @@ class EventDetailsFragment : Fragment(), SwipeRefreshLayout.OnRefreshListener { private val binding by viewBinding(FragmentEventDetailsBinding::bind) - override fun onAttach(context: Context) { - super.onAttach(context) - injector.ticketsComponent() - .eventId(event.id) - .build() - .inject(this) - } - override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, diff --git a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventsListFragment.kt b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventsListFragment.kt index 3bd78da5c..7e9f8ae62 100644 --- a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventsListFragment.kt +++ b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventsListFragment.kt @@ -1,6 +1,5 @@ package de.tum.`in`.tumcampusapp.component.ui.ticket.fragment -import android.content.Context import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -20,7 +19,6 @@ import de.tum.`in`.tumcampusapp.component.ui.ticket.adapter.EventsAdapter import de.tum.`in`.tumcampusapp.component.ui.ticket.model.EventType import de.tum.`in`.tumcampusapp.databinding.FragmentEventsListBinding import de.tum.`in`.tumcampusapp.di.ViewModelFactory -import de.tum.`in`.tumcampusapp.di.injector import de.tum.`in`.tumcampusapp.utils.Const.CHAT_MEMBER import de.tum.`in`.tumcampusapp.utils.Utils import de.tum.`in`.tumcampusapp.utils.observeNonNull @@ -44,14 +42,6 @@ class EventsListFragment : Fragment(), SwipeRefreshLayout.OnRefreshListener { private val binding by viewBinding(FragmentEventsListBinding::bind) - override fun onAttach(context: Context) { - super.onAttach(context) - injector.eventsComponent() - .eventType(eventType) - .build() - .inject(this) - } - override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, diff --git a/app/src/main/java/de/tum/in/tumcampusapp/di/AppComponent.kt b/app/src/main/java/de/tum/in/tumcampusapp/di/AppComponent.kt index 3c0d28a91..5d481c846 100644 --- a/app/src/main/java/de/tum/in/tumcampusapp/di/AppComponent.kt +++ b/app/src/main/java/de/tum/in/tumcampusapp/di/AppComponent.kt @@ -13,8 +13,6 @@ import de.tum.`in`.tumcampusapp.component.ui.onboarding.di.OnboardingComponent import de.tum.`in`.tumcampusapp.component.ui.overview.MainActivity import de.tum.`in`.tumcampusapp.component.ui.overview.MainFragment import de.tum.`in`.tumcampusapp.component.ui.search.di.SearchComponent -import de.tum.`in`.tumcampusapp.component.ui.ticket.di.EventsComponent -import de.tum.`in`.tumcampusapp.component.ui.ticket.di.TicketsComponent import de.tum.`in`.tumcampusapp.component.ui.tufilm.di.KinoComponent import de.tum.`in`.tumcampusapp.service.di.DownloadComponent import javax.inject.Singleton @@ -25,12 +23,10 @@ interface AppComponent { fun cafeteriaComponent(): CafeteriaComponent fun downloadComponent(): DownloadComponent - fun eventsComponent(): EventsComponent.Builder fun feedbackComponent(): FeedbackComponent.Builder fun kinoComponent(): KinoComponent fun newsComponent(): NewsComponent fun onboardingComponent(): OnboardingComponent.Factory - fun ticketsComponent(): TicketsComponent.Builder fun roomFinderComponent(): RoomFinderComponent fun searchComponent(): SearchComponent fun navigationDetailsComponent(): NavigationDetailsComponent diff --git a/app/src/main/java/de/tum/in/tumcampusapp/service/di/DownloadModule.kt b/app/src/main/java/de/tum/in/tumcampusapp/service/di/DownloadModule.kt index 1de08f77e..44b7f3fb3 100644 --- a/app/src/main/java/de/tum/in/tumcampusapp/service/di/DownloadModule.kt +++ b/app/src/main/java/de/tum/in/tumcampusapp/service/di/DownloadModule.kt @@ -102,7 +102,6 @@ object DownloadModule { fun provideWorkerActions( cafeteriaDownloadAction: CafeteriaDownloadAction, locationImportAction: LocationImportAction, - eventsDownloadAction: EventsDownloadAction, filmDownloadAction: FilmDownloadAction, gradesDownloadAction: GradesDownloadAction, idUploadAction: IdUploadAction, @@ -112,7 +111,6 @@ object DownloadModule { ): DownloadWorker.WorkerActions = DownloadWorker.WorkerActions( cafeteriaDownloadAction, locationImportAction, - eventsDownloadAction, filmDownloadAction, gradesDownloadAction, idUploadAction, From 30654f0cde87c7560b6136de47476058dadae76c Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Tue, 29 Aug 2023 16:51:07 +0200 Subject: [PATCH 4/5] removed the components as well (not only where they are used) --- .../component/ui/ticket/di/EventsComponent.kt | 21 --------- .../ui/ticket/di/TicketsComponent.kt | 43 ------------------- 2 files changed, 64 deletions(-) delete mode 100644 app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/di/EventsComponent.kt delete mode 100644 app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/di/TicketsComponent.kt diff --git a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/di/EventsComponent.kt b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/di/EventsComponent.kt deleted file mode 100644 index ce5348a34..000000000 --- a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/di/EventsComponent.kt +++ /dev/null @@ -1,21 +0,0 @@ -package de.tum.`in`.tumcampusapp.component.ui.ticket.di - -import dagger.BindsInstance -import dagger.Subcomponent -import de.tum.`in`.tumcampusapp.component.ui.ticket.fragment.EventsListFragment -import de.tum.`in`.tumcampusapp.component.ui.ticket.model.EventType - -@Subcomponent -interface EventsComponent { - - fun inject(eventsListFragment: EventsListFragment) - - @Subcomponent.Builder - interface Builder { - - @BindsInstance - fun eventType(eventType: EventType): Builder - - fun build(): EventsComponent - } -} diff --git a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/di/TicketsComponent.kt b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/di/TicketsComponent.kt deleted file mode 100644 index a975c1ead..000000000 --- a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/di/TicketsComponent.kt +++ /dev/null @@ -1,43 +0,0 @@ -package de.tum.`in`.tumcampusapp.component.ui.ticket.di - -import dagger.Binds -import dagger.BindsInstance -import dagger.Module -import dagger.Subcomponent -import de.tum.`in`.tumcampusapp.component.ui.ticket.EventsDownloadAction -import de.tum.`in`.tumcampusapp.component.ui.ticket.activity.BuyTicketActivity -import de.tum.`in`.tumcampusapp.component.ui.ticket.activity.EventsActivity -import de.tum.`in`.tumcampusapp.component.ui.ticket.activity.ShowTicketActivity -import de.tum.`in`.tumcampusapp.component.ui.ticket.activity.StripePaymentActivity -import de.tum.`in`.tumcampusapp.component.ui.ticket.fragment.EventDetailsFragment -import de.tum.`in`.tumcampusapp.service.DownloadWorker - -@Subcomponent(modules = [TicketsModule::class]) -interface TicketsComponent { - - fun inject(eventDetailsFragment: EventDetailsFragment) - - fun inject(eventsActivity: EventsActivity) - - fun inject(buyTicketActivity: BuyTicketActivity) - - fun inject(stripePaymentActivity: StripePaymentActivity) - - fun inject(showTicketActivity: ShowTicketActivity) - - @Subcomponent.Builder - interface Builder { - - @BindsInstance - fun eventId(@EventId eventId: Int): Builder - - fun build(): TicketsComponent - } -} - -@Module -interface TicketsModule { - - @Binds - fun bindEventsDownloadAction(impl: EventsDownloadAction): DownloadWorker.Action -} From e57274129598164945584e28d3848cf37ecd14eb Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Tue, 29 Aug 2023 17:05:05 +0200 Subject: [PATCH 5/5] removed unused import --- .../component/ui/ticket/fragment/EventDetailsFragment.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventDetailsFragment.kt b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventDetailsFragment.kt index 4be4e47c8..793265af6 100644 --- a/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventDetailsFragment.kt +++ b/app/src/main/java/de/tum/in/tumcampusapp/component/ui/ticket/fragment/EventDetailsFragment.kt @@ -1,6 +1,5 @@ package de.tum.`in`.tumcampusapp.component.ui.ticket.fragment -import android.content.Context import android.content.Intent import android.net.Uri import android.os.Bundle