forked from upstream-mirrors/quik
#1069 - Add ability to take photo from app
This commit is contained in:
@@ -67,6 +67,8 @@ class ComposeActivity : QkThemedActivity<ComposeViewModel>(), ComposeView {
|
||||
override val attachmentDeletedIntent: Subject<Uri> by lazy { attachmentAdapter.attachmentDeleted }
|
||||
override val textChangedIntent by lazy { message.textChanges() }
|
||||
override val attachIntent by lazy { attach.clicks() }
|
||||
override val cameraIntent by lazy { camera.clicks() }
|
||||
override val galleryIntent by lazy { gallery.clicks() }
|
||||
override val sendIntent by lazy { send.clicks() }
|
||||
|
||||
@Inject lateinit var chipsAdapter: ChipsAdapter
|
||||
@@ -129,7 +131,11 @@ class ComposeActivity : QkThemedActivity<ComposeViewModel>(), ComposeView {
|
||||
|
||||
colors.textSecondary
|
||||
.autoDisposable(scope())
|
||||
.subscribe { color -> attach.setTint(color) }
|
||||
.subscribe { color ->
|
||||
attach.setTint(color)
|
||||
camera.setTint(color)
|
||||
gallery.setTint(color)
|
||||
}
|
||||
|
||||
colors.bubble
|
||||
.autoDisposable(scope())
|
||||
@@ -189,6 +195,10 @@ class ComposeActivity : QkThemedActivity<ComposeViewModel>(), ComposeView {
|
||||
attachments.setVisible(state.attachments.isNotEmpty())
|
||||
attachmentAdapter.data = state.attachments
|
||||
|
||||
attach.animate().rotation(if (state.attaching) 45f else 0f).start()
|
||||
camera.setVisible(state.attaching)
|
||||
gallery.setVisible(state.attaching)
|
||||
|
||||
if (title != state.title) title = state.title
|
||||
|
||||
counter.text = state.remaining
|
||||
|
||||
Reference in New Issue
Block a user