diff --git a/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivity.kt b/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivity.kt index 656ce0d4..f9a135ac 100644 --- a/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivity.kt +++ b/presentation/src/main/java/com/moez/QKSMS/feature/compose/ComposeActivity.kt @@ -59,6 +59,7 @@ import com.moez.QKSMS.model.Message import com.uber.autodispose.kotlin.autoDisposable import dagger.android.AndroidInjection import io.reactivex.Observable +import io.reactivex.rxkotlin.Observables import io.reactivex.subjects.PublishSubject import io.reactivex.subjects.Subject import kotlinx.android.synthetic.main.compose_activity.* @@ -96,7 +97,7 @@ class ComposeActivity : QkThemedActivity(), ComposeView { override val cancelSendingIntent: Subject by lazy { messageAdapter.cancelSending } override val attachmentDeletedIntent: Subject by lazy { attachmentAdapter.attachmentDeleted } override val textChangedIntent by lazy { message.textChanges() } - override val attachIntent by lazy { attach.clicks() } + override val attachIntent by lazy { Observable.merge(attach.clicks(), attachingBackground.clicks()) } override val cameraIntent by lazy { camera.clicks() } override val galleryIntent by lazy { gallery.clicks() } override val scheduleIntent by lazy { schedule.clicks() } @@ -224,10 +225,8 @@ class ComposeActivity : QkThemedActivity(), ComposeView { attachments.setVisible(state.attachments.isNotEmpty()) attachmentAdapter.data = state.attachments - attach.animate().rotation(if (state.attaching) 135f else 0f).start() - camera.setVisible(state.attaching) - gallery.setVisible(state.attaching) - schedule.setVisible(state.attaching) + attach.animate().rotation(if (state.attaching) 45f else 0f).start() + attaching.isVisible = state.attaching counter.text = state.remaining counter.setVisible(counter.text.isNotBlank()) diff --git a/presentation/src/main/res/layout/compose_activity.xml b/presentation/src/main/res/layout/compose_activity.xml index 94f16cc3..32612571 100644 --- a/presentation/src/main/res/layout/compose_activity.xml +++ b/presentation/src/main/res/layout/compose_activity.xml @@ -164,73 +164,6 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="@id/messageBackground" /> - - - - - - - - + + + + + + + + + + + + \ No newline at end of file