From 96e5eca39770c7eb7bf2d052d9b6565a47d2b876 Mon Sep 17 00:00:00 2001 From: Narinder Rana Date: Mon, 14 Mar 2022 13:04:07 +0530 Subject: [PATCH 1/3] Remove QKSMS_plus calling part --- .../moez/QKSMS/feature/main/MainActivity.kt | 4 ++-- .../com/moez/QKSMS/feature/main/MainView.kt | 2 +- .../moez/QKSMS/feature/main/MainViewModel.kt | 2 +- .../src/main/res/layout/drawer_view.xml | 22 +++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt index 05bda5590..4a669241d 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt @@ -101,7 +101,7 @@ class MainActivity : QkThemedActivity(), MainView { scheduled.clicks().map { NavItem.SCHEDULED }, blocking.clicks().map { NavItem.BLOCKING }, settings.clicks().map { NavItem.SETTINGS }, - plus.clicks().map { NavItem.PLUS }, +// plus.clicks().map { NavItem.PLUS }, help.clicks().map { NavItem.HELP }, invite.clicks().map { NavItem.INVITE })) } @@ -243,7 +243,7 @@ class MainActivity : QkThemedActivity(), MainView { listOf(plusBadge1, plusBadge2).forEach { badge -> badge.isVisible = drawerBadgesExperiment.variant && !state.upgraded } - plus.isVisible = state.upgraded +// plus.isVisible = state.upgraded plusBanner.isVisible = !state.upgraded rateLayout.setVisible(state.showRating) diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainView.kt b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainView.kt index 81f87df27..03cc29d59 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainView.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainView.kt @@ -55,4 +55,4 @@ interface MainView : QkView { } -enum class NavItem { BACK, INBOX, ARCHIVED, BACKUP, SCHEDULED, BLOCKING, SETTINGS, PLUS, HELP, INVITE } \ No newline at end of file +enum class NavItem { BACK, INBOX, ARCHIVED, BACKUP, SCHEDULED, BLOCKING, SETTINGS, HELP, INVITE } \ No newline at end of file diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt index 11bd3e09c..d2f96e4fa 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt @@ -263,7 +263,7 @@ class MainViewModel @Inject constructor( NavItem.SCHEDULED -> navigator.showScheduled() NavItem.BLOCKING -> navigator.showBlockedConversations() NavItem.SETTINGS -> navigator.showSettings() - NavItem.PLUS -> navigator.showQksmsPlusActivity("main_menu") +// NavItem.PLUS -> navigator.showQksmsPlusActivity("main_menu") NavItem.HELP -> navigator.showSupport() NavItem.INVITE -> navigator.showInvite() else -> Unit diff --git a/presentation/src/main/res/layout/drawer_view.xml b/presentation/src/main/res/layout/drawer_view.xml index a7c33dade..a8637ff96 100644 --- a/presentation/src/main/res/layout/drawer_view.xml +++ b/presentation/src/main/res/layout/drawer_view.xml @@ -165,20 +165,20 @@ - + + + - + + + + - + + + - + Date: Mon, 14 Mar 2022 13:16:41 +0530 Subject: [PATCH 2/3] refine code, remove comment --- .../com/moez/QKSMS/feature/main/MainActivity.kt | 2 +- .../com/moez/QKSMS/feature/main/MainViewModel.kt | 2 +- presentation/src/main/res/layout/drawer_view.xml | 14 -------------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt index 4a669241d..023f36dcf 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt @@ -243,7 +243,7 @@ class MainActivity : QkThemedActivity(), MainView { listOf(plusBadge1, plusBadge2).forEach { badge -> badge.isVisible = drawerBadgesExperiment.variant && !state.upgraded } -// plus.isVisible = state.upgraded + plusBanner.isVisible = !state.upgraded rateLayout.setVisible(state.showRating) diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt index d2f96e4fa..a24ad1e92 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainViewModel.kt @@ -263,7 +263,7 @@ class MainViewModel @Inject constructor( NavItem.SCHEDULED -> navigator.showScheduled() NavItem.BLOCKING -> navigator.showBlockedConversations() NavItem.SETTINGS -> navigator.showSettings() -// NavItem.PLUS -> navigator.showQksmsPlusActivity("main_menu") + NavItem.HELP -> navigator.showSupport() NavItem.INVITE -> navigator.showInvite() else -> Unit diff --git a/presentation/src/main/res/layout/drawer_view.xml b/presentation/src/main/res/layout/drawer_view.xml index a8637ff96..2a419e887 100644 --- a/presentation/src/main/res/layout/drawer_view.xml +++ b/presentation/src/main/res/layout/drawer_view.xml @@ -165,20 +165,6 @@ - - - - - - - - - - - - - - Date: Mon, 21 Mar 2022 11:45:32 +0000 Subject: [PATCH 3/3] remove unused code --- .../src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt index 023f36dcf..791b634ae 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/main/MainActivity.kt @@ -101,7 +101,7 @@ class MainActivity : QkThemedActivity(), MainView { scheduled.clicks().map { NavItem.SCHEDULED }, blocking.clicks().map { NavItem.BLOCKING }, settings.clicks().map { NavItem.SETTINGS }, -// plus.clicks().map { NavItem.PLUS }, + help.clicks().map { NavItem.HELP }, invite.clicks().map { NavItem.INVITE })) } @@ -414,4 +414,4 @@ class MainActivity : QkThemedActivity(), MainView { backPressedSubject.onNext(NavItem.BACK) } -} \ No newline at end of file +} -- GitLab