forked from upstream-mirrors/quik
Show blocking management in main nav
This commit is contained in:
@@ -81,6 +81,7 @@ class MainActivity : QkThemedActivity(), MainView {
|
|||||||
inbox.clicks().map { DrawerItem.INBOX },
|
inbox.clicks().map { DrawerItem.INBOX },
|
||||||
archived.clicks().map { DrawerItem.ARCHIVED },
|
archived.clicks().map { DrawerItem.ARCHIVED },
|
||||||
scheduled.clicks().map { DrawerItem.SCHEDULED },
|
scheduled.clicks().map { DrawerItem.SCHEDULED },
|
||||||
|
blocking.clicks().map { DrawerItem.BLOCKING },
|
||||||
settings.clicks().map { DrawerItem.SETTINGS },
|
settings.clicks().map { DrawerItem.SETTINGS },
|
||||||
plus.clicks().map { DrawerItem.PLUS },
|
plus.clicks().map { DrawerItem.PLUS },
|
||||||
help.clicks().map { DrawerItem.HELP }))
|
help.clicks().map { DrawerItem.HELP }))
|
||||||
@@ -133,10 +134,6 @@ class MainActivity : QkThemedActivity(), MainView {
|
|||||||
.let { tintList ->
|
.let { tintList ->
|
||||||
inboxIcon.imageTintList = tintList
|
inboxIcon.imageTintList = tintList
|
||||||
archivedIcon.imageTintList = tintList
|
archivedIcon.imageTintList = tintList
|
||||||
scheduledIcon.imageTintList = tintList
|
|
||||||
settingsIcon.imageTintList = tintList
|
|
||||||
plusIcon.imageTintList = tintList
|
|
||||||
helpIcon.imageTintList = tintList
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.doOnNext { theme ->
|
.doOnNext { theme ->
|
||||||
|
|||||||
@@ -46,4 +46,4 @@ interface MainView : QkView<MainState> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class DrawerItem { INBOX, ARCHIVED, SCHEDULED, BLOCKED, SETTINGS, PLUS, HELP }
|
enum class DrawerItem { INBOX, ARCHIVED, SCHEDULED, BLOCKING, SETTINGS, PLUS, HELP }
|
||||||
@@ -181,6 +181,7 @@ class MainViewModel @Inject constructor(
|
|||||||
view.drawerItemIntent
|
view.drawerItemIntent
|
||||||
.doOnNext { newState { copy(drawerOpen = false) } }
|
.doOnNext { newState { copy(drawerOpen = false) } }
|
||||||
.doOnNext { if (it == DrawerItem.SCHEDULED) navigator.showScheduled() }
|
.doOnNext { if (it == DrawerItem.SCHEDULED) navigator.showScheduled() }
|
||||||
|
.doOnNext { if (it == DrawerItem.BLOCKING) navigator.showBlockedConversations() }
|
||||||
.doOnNext { if (it == DrawerItem.SETTINGS) navigator.showSettings() }
|
.doOnNext { if (it == DrawerItem.SETTINGS) navigator.showSettings() }
|
||||||
.doOnNext { if (it == DrawerItem.PLUS) navigator.showQksmsPlusActivity() }
|
.doOnNext { if (it == DrawerItem.PLUS) navigator.showQksmsPlusActivity() }
|
||||||
.doOnNext { if (it == DrawerItem.HELP) navigator.showSupport() }
|
.doOnNext { if (it == DrawerItem.HELP) navigator.showSupport() }
|
||||||
|
|||||||
@@ -91,4 +91,10 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/toolbar" />
|
app:layout_constraintTop_toBottomOf="@id/toolbar" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="?android:attr/divider"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@@ -58,15 +58,21 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="?android:attr/divider" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/scheduled"
|
android:id="@+id/scheduled"
|
||||||
style="@style/DrawerRow">
|
style="@style/DrawerRow">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/scheduledIcon"
|
|
||||||
style="@style/DrawerIcon"
|
style="@style/DrawerIcon"
|
||||||
android:src="@drawable/ic_event_black_24dp"
|
android:src="@drawable/ic_event_black_24dp"
|
||||||
tools:tint="?android:attr/textColorSecondary" />
|
android:tint="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
<com.moez.QKSMS.common.widget.QkTextView
|
<com.moez.QKSMS.common.widget.QkTextView
|
||||||
style="@style/DrawerText"
|
style="@style/DrawerText"
|
||||||
@@ -74,28 +80,36 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/blocking"
|
||||||
|
style="@style/DrawerRow">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
style="@style/DrawerIcon"
|
||||||
|
android:src="@drawable/ic_block_black_24dp"
|
||||||
|
android:tint="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
|
<com.moez.QKSMS.common.widget.QkTextView
|
||||||
|
style="@style/DrawerText"
|
||||||
|
android:text="@string/drawer_blocking" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:background="?android:attr/divider" />
|
android:background="?android:attr/divider" />
|
||||||
|
|
||||||
<com.moez.QKSMS.common.widget.QkTextView
|
|
||||||
style="@style/TextSecondary"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:text="@string/drawer_more" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/settings"
|
android:id="@+id/settings"
|
||||||
style="@style/DrawerRow">
|
style="@style/DrawerRow">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/settingsIcon"
|
|
||||||
style="@style/DrawerIcon"
|
style="@style/DrawerIcon"
|
||||||
android:src="@drawable/ic_settings_black_24dp"
|
android:src="@drawable/ic_settings_black_24dp"
|
||||||
tools:tint="?android:attr/textColorSecondary" />
|
android:tint="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
<com.moez.QKSMS.common.widget.QkTextView
|
<com.moez.QKSMS.common.widget.QkTextView
|
||||||
style="@style/DrawerText"
|
style="@style/DrawerText"
|
||||||
@@ -108,10 +122,9 @@
|
|||||||
style="@style/DrawerRow">
|
style="@style/DrawerRow">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/plusIcon"
|
|
||||||
style="@style/DrawerIcon"
|
style="@style/DrawerIcon"
|
||||||
android:src="@drawable/ic_star_black_24dp"
|
android:src="@drawable/ic_star_black_24dp"
|
||||||
tools:tint="?android:attr/textColorSecondary" />
|
android:tint="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
<com.moez.QKSMS.common.widget.QkTextView
|
<com.moez.QKSMS.common.widget.QkTextView
|
||||||
style="@style/DrawerText"
|
style="@style/DrawerText"
|
||||||
@@ -124,10 +137,9 @@
|
|||||||
style="@style/DrawerRow">
|
style="@style/DrawerRow">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/helpIcon"
|
|
||||||
style="@style/DrawerIcon"
|
style="@style/DrawerIcon"
|
||||||
android:src="@drawable/ic_help_black_24dp"
|
android:src="@drawable/ic_help_black_24dp"
|
||||||
tools:tint="?android:attr/textColorSecondary" />
|
android:tint="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
<com.moez.QKSMS.common.widget.QkTextView
|
<com.moez.QKSMS.common.widget.QkTextView
|
||||||
style="@style/DrawerText"
|
style="@style/DrawerText"
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
<string name="drawer_inbox">Inbox</string>
|
<string name="drawer_inbox">Inbox</string>
|
||||||
<string name="drawer_archived">Archived</string>
|
<string name="drawer_archived">Archived</string>
|
||||||
<string name="drawer_scheduled">Scheduled</string>
|
<string name="drawer_scheduled">Scheduled</string>
|
||||||
|
<string name="drawer_blocking">Blocking</string>
|
||||||
<string name="drawer_more">More</string>
|
<string name="drawer_more">More</string>
|
||||||
<string name="drawer_settings">Settings</string>
|
<string name="drawer_settings">Settings</string>
|
||||||
<string name="drawer_plus">QKSMS+</string>
|
<string name="drawer_plus">QKSMS+</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user