forked from upstream-mirrors/quik
Use theme colour for snackbar action
This commit is contained in:
@@ -313,6 +313,7 @@ class ComposeActivity : QkThemedActivity(), ComposeView {
|
|||||||
override fun showQksmsPlusSnackbar(message: Int) {
|
override fun showQksmsPlusSnackbar(message: Int) {
|
||||||
Snackbar.make(contentView, message, Snackbar.LENGTH_LONG).run {
|
Snackbar.make(contentView, message, Snackbar.LENGTH_LONG).run {
|
||||||
setAction(R.string.button_more) { viewQksmsPlusIntent.onNext(Unit) }
|
setAction(R.string.button_more) { viewQksmsPlusIntent.onNext(Unit) }
|
||||||
|
setActionTextColor(colors.theme().theme)
|
||||||
show()
|
show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,11 +115,6 @@ class MainActivity : QkThemedActivity(), MainView {
|
|||||||
private val itemTouchHelper by lazy { ItemTouchHelper(itemTouchCallback) }
|
private val itemTouchHelper by lazy { ItemTouchHelper(itemTouchCallback) }
|
||||||
private val progressAnimator by lazy { ObjectAnimator.ofInt(syncingProgress, "progress", 0, 0) }
|
private val progressAnimator by lazy { ObjectAnimator.ofInt(syncingProgress, "progress", 0, 0) }
|
||||||
private val changelog by lazy { ChangelogDialog(this) }
|
private val changelog by lazy { ChangelogDialog(this) }
|
||||||
private val archiveSnackbar by lazy {
|
|
||||||
Snackbar.make(drawerLayout, R.string.toast_archived, Snackbar.LENGTH_LONG).apply {
|
|
||||||
setAction(R.string.button_undo) { undoArchiveIntent.onNext(Unit) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private val snackbar by lazy { findViewById<View>(R.id.snackbar) }
|
private val snackbar by lazy { findViewById<View>(R.id.snackbar) }
|
||||||
private val syncing by lazy { findViewById<View>(R.id.syncing) }
|
private val syncing by lazy { findViewById<View>(R.id.syncing) }
|
||||||
|
|
||||||
@@ -351,7 +346,11 @@ class MainActivity : QkThemedActivity(), MainView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun showArchivedSnackbar() {
|
override fun showArchivedSnackbar() {
|
||||||
archiveSnackbar.show()
|
Snackbar.make(drawerLayout, R.string.toast_archived, Snackbar.LENGTH_LONG).apply {
|
||||||
|
setAction(R.string.button_undo) { undoArchiveIntent.onNext(Unit) }
|
||||||
|
setActionTextColor(colors.theme().theme)
|
||||||
|
show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ class SettingsController : QkController<SettingsView, SettingsState, SettingsPre
|
|||||||
view?.run {
|
view?.run {
|
||||||
Snackbar.make(contentView, R.string.toast_qksms_plus, Snackbar.LENGTH_LONG).run {
|
Snackbar.make(contentView, R.string.toast_qksms_plus, Snackbar.LENGTH_LONG).run {
|
||||||
setAction(R.string.button_more) { viewQksmsPlusSubject.onNext(Unit) }
|
setAction(R.string.button_more) { viewQksmsPlusSubject.onNext(Unit) }
|
||||||
|
setActionTextColor(colors.theme().theme)
|
||||||
show()
|
show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ class ThemePickerController(val threadId: Long = 0L) : QkController<ThemePickerV
|
|||||||
override fun showQksmsPlusSnackbar() {
|
override fun showQksmsPlusSnackbar() {
|
||||||
Snackbar.make(contentView, R.string.toast_qksms_plus, Snackbar.LENGTH_LONG).run {
|
Snackbar.make(contentView, R.string.toast_qksms_plus, Snackbar.LENGTH_LONG).run {
|
||||||
setAction(R.string.button_more) { viewQksmsPlusSubject.onNext(Unit) }
|
setAction(R.string.button_more) { viewQksmsPlusSubject.onNext(Unit) }
|
||||||
|
setActionTextColor(colors.theme().theme)
|
||||||
show()
|
show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user