From cebe11f7f4fa978fd0d23a7879ecfb333e1075aa Mon Sep 17 00:00:00 2001 From: Amanpal Singh <87360222+aman-alfresco@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:51:04 +0530 Subject: [PATCH] added bottom banner --- .../com/alfresco/content/app/activity/ProcessActivity.kt | 9 +++++++++ app/src/main/res/layout/activity_process.xml | 7 +++++++ .../content/process/ui/fragments/FormViewModel.kt | 1 + 3 files changed, 17 insertions(+) diff --git a/app/src/main/java/com/alfresco/content/app/activity/ProcessActivity.kt b/app/src/main/java/com/alfresco/content/app/activity/ProcessActivity.kt index 252384cb..c64b0d57 100644 --- a/app/src/main/java/com/alfresco/content/app/activity/ProcessActivity.kt +++ b/app/src/main/java/com/alfresco/content/app/activity/ProcessActivity.kt @@ -1,8 +1,10 @@ package com.alfresco.content.app.activity import android.os.Bundle +import androidx.lifecycle.lifecycleScope import androidx.navigation.fragment.NavHostFragment import com.airbnb.mvrx.MavericksView +import com.alfresco.content.actions.Action import com.alfresco.content.app.R import com.alfresco.content.app.databinding.ActivityProcessBinding import com.alfresco.content.app.widget.ActionBarController @@ -19,6 +21,7 @@ class ProcessActivity : BaseActivity(), MavericksView { binding = ActivityProcessBinding.inflate(layoutInflater) setContentView(binding.root) configureNav() + setupActionToasts() } private fun configureNav() { @@ -35,6 +38,12 @@ class ProcessActivity : BaseActivity(), MavericksView { actionBarLayout.toolbar.setNavigationOnClickListener { onBackPressed() } } + private fun setupActionToasts() = Action.showActionToasts( + lifecycleScope, + binding.root, + binding.bottomView, + ) + override fun invalidate() { } } diff --git a/app/src/main/res/layout/activity_process.xml b/app/src/main/res/layout/activity_process.xml index 0baf75cb..3de2df20 100644 --- a/app/src/main/res/layout/activity_process.xml +++ b/app/src/main/res/layout/activity_process.xml @@ -21,5 +21,12 @@ android:layout_height="1dp" android:background="@android:color/white" android:backgroundTint="?attr/separatorColor" /> + diff --git a/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/FormViewModel.kt b/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/FormViewModel.kt index a1ef1cce..27b83137 100644 --- a/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/FormViewModel.kt +++ b/process-app/src/main/kotlin/com/alfresco/content/process/ui/fragments/FormViewModel.kt @@ -80,6 +80,7 @@ class FormViewModel( observeUploadsJob = repo.observeUploads(observerID, UploadServerType.UPLOAD_TO_PROCESS) .execute { if (it is Success) { + println("FormViewModel.observeUploads ${it.invoke()}") updateUploads(it()) } else { this