Skip to content

Commit

Permalink
Added NewMessageDetailsFragment as a temp container for the future ch…
Browse files Browse the repository at this point in the history
…anges.| #74
  • Loading branch information
DenBond7 committed Aug 13, 2024
1 parent 77cc852 commit 671012b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* © 2016-present FlowCrypt a.s. Limitations apply. Contact [email protected]
* Contributors: denbond7
*/

package com.flowcrypt.email.ui.activity.fragment;

import androidx.fragment.app.Fragment;

/**
* @author Denys Bondarenko
*/
public class NewMessageDetailsFragment extends Fragment {
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
}
Expand Down
10 changes: 10 additions & 0 deletions FlowCrypt/src/main/res/layout/fragment_new_message_details.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ © 2016-present FlowCrypt a.s. Limitations apply. Contact [email protected]
~ Contributors: denbond7
-->

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">

</androidx.constraintlayout.widget.ConstraintLayout>
13 changes: 13 additions & 0 deletions FlowCrypt/src/main/res/navigation/nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,19 @@
android:defaultValue="false" />
</fragment>

<fragment
android:id="@+id/newMessageDetailsFragment"
android:name="com.flowcrypt.email.ui.activity.fragment.NewMessageDetailsFragment"
tools:layout="@layout/fragment_new_message_details">
<argument
android:name="messageEntityId"
app:argType="long" />
<argument
android:name="isViewPagerMode"
app:argType="boolean"
android:defaultValue="false" />
</fragment>

<fragment
android:id="@+id/searchBackupsInEmailFragment"
android:name="com.flowcrypt.email.ui.activity.fragment.SearchBackupsInEmailFragment"
Expand Down

0 comments on commit 671012b

Please sign in to comment.