forked from upstream-mirrors/quik
Migrate ConversationInfo to Controller
This commit is contained in:
@@ -21,6 +21,9 @@ abstract class QkController<ViewContract : QkViewContract<State>, State, Present
|
||||
private val appCompatActivity: AppCompatActivity?
|
||||
get() = activity as? AppCompatActivity
|
||||
|
||||
protected val themedActivity: QkThemedActivity?
|
||||
get() = activity as? QkThemedActivity
|
||||
|
||||
override var containerView: View? = null
|
||||
|
||||
@LayoutRes
|
||||
|
||||
@@ -53,12 +53,12 @@ abstract class QkThemedActivity : QkActivity() {
|
||||
* In case the activity should be themed for a specific conversation, the selected conversation
|
||||
* can be changed by pushing the threadId to this subject
|
||||
*/
|
||||
protected val threadId: Subject<Long> = BehaviorSubject.createDefault(0)
|
||||
val threadId: Subject<Long> = BehaviorSubject.createDefault(0)
|
||||
|
||||
/**
|
||||
* Switch the theme if the threadId changes
|
||||
*/
|
||||
protected val theme = threadId
|
||||
val theme = threadId
|
||||
.distinctUntilChanged()
|
||||
.switchMap { threadId -> colors.themeObservable(threadId) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user