From 671012bf9a926b1f0a3758bb2cca058c2ab16f0c Mon Sep 17 00:00:00 2001 From: DenBond7 Date: Tue, 13 Aug 2024 11:02:23 +0300 Subject: [PATCH] Added NewMessageDetailsFragment as a temp container for the future changes.| #74 --- .../fragment/NewMessageDetailsFragment.java | 14 ++++++++++++++ .../flowcrypt/email/ui/adapter/FragmentsAdapter.kt | 11 +++++------ .../res/layout/fragment_new_message_details.xml | 10 ++++++++++ FlowCrypt/src/main/res/navigation/nav_graph.xml | 13 +++++++++++++ 4 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/NewMessageDetailsFragment.java create mode 100644 FlowCrypt/src/main/res/layout/fragment_new_message_details.xml diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/NewMessageDetailsFragment.java b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/NewMessageDetailsFragment.java new file mode 100644 index 000000000..d894552f3 --- /dev/null +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/activity/fragment/NewMessageDetailsFragment.java @@ -0,0 +1,14 @@ +/* + * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com + * Contributors: denbond7 + */ + +package com.flowcrypt.email.ui.activity.fragment; + +import androidx.fragment.app.Fragment; + +/** + * @author Denys Bondarenko + */ +public class NewMessageDetailsFragment extends Fragment { +} diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/ui/adapter/FragmentsAdapter.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/adapter/FragmentsAdapter.kt index 5af69cccc..58568ac4c 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/ui/adapter/FragmentsAdapter.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/ui/adapter/FragmentsAdapter.kt @@ -11,8 +11,8 @@ import androidx.recyclerview.widget.DiffUtil import androidx.viewpager2.adapter.FragmentStateAdapter import com.flowcrypt.email.api.email.model.LocalFolder import com.flowcrypt.email.database.entity.MessageEntity -import com.flowcrypt.email.ui.activity.fragment.MessageDetailsFragment -import com.flowcrypt.email.ui.activity.fragment.MessageDetailsFragmentArgs +import com.flowcrypt.email.ui.activity.fragment.NewMessageDetailsFragment +import com.flowcrypt.email.ui.activity.fragment.NewMessageDetailsFragmentArgs /** * @author Denys Bondarenko @@ -45,10 +45,9 @@ class FragmentsAdapter( override fun getItemCount(): Int = asyncListDiffer.currentList.size override fun createFragment(position: Int): Fragment = - MessageDetailsFragment().apply { - arguments = MessageDetailsFragmentArgs( - messageEntity = asyncListDiffer.currentList[position], - localFolder = localFolder, + NewMessageDetailsFragment().apply { + arguments = NewMessageDetailsFragmentArgs( + messageEntityId = requireNotNull(asyncListDiffer.currentList[position].id), isViewPagerMode = true ).toBundle() } diff --git a/FlowCrypt/src/main/res/layout/fragment_new_message_details.xml b/FlowCrypt/src/main/res/layout/fragment_new_message_details.xml new file mode 100644 index 000000000..0361973f4 --- /dev/null +++ b/FlowCrypt/src/main/res/layout/fragment_new_message_details.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/FlowCrypt/src/main/res/navigation/nav_graph.xml b/FlowCrypt/src/main/res/navigation/nav_graph.xml index dd99423ab..bb76a5e34 100644 --- a/FlowCrypt/src/main/res/navigation/nav_graph.xml +++ b/FlowCrypt/src/main/res/navigation/nav_graph.xml @@ -326,6 +326,19 @@ android:defaultValue="false" /> + + + + +