mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 13:47:05 +02:00
Added unified folder types
This commit is contained in:
@@ -85,6 +85,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
private ActionBarDrawerToggle drawerToggle;
|
||||
private ScrollView drawerContainer;
|
||||
private RecyclerView rvAccount;
|
||||
private RecyclerView rvUnified;
|
||||
private RecyclerView rvFolder;
|
||||
private RecyclerView rvMenu;
|
||||
private ImageView ivExpander;
|
||||
@@ -154,6 +155,11 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
final AdapterNavAccount aadapter = new AdapterNavAccount(this, this);
|
||||
rvAccount.setAdapter(aadapter);
|
||||
|
||||
rvUnified = drawerContainer.findViewById(R.id.rvUnified);
|
||||
rvUnified.setLayoutManager(new LinearLayoutManager(this));
|
||||
final AdapterNavUnified uadapter = new AdapterNavUnified(this, this);
|
||||
rvUnified.setAdapter(uadapter);
|
||||
|
||||
rvFolder = drawerContainer.findViewById(R.id.rvFolder);
|
||||
rvFolder.setLayoutManager(new LinearLayoutManager(this));
|
||||
final AdapterNavFolder fadapter = new AdapterNavFolder(this, this);
|
||||
@@ -352,6 +358,15 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
}
|
||||
});
|
||||
|
||||
db.folder().liveUnifiedTypes().observe(this, new Observer<List<String>>() {
|
||||
@Override
|
||||
public void onChanged(List<String> types) {
|
||||
if (types == null)
|
||||
types = new ArrayList<>();
|
||||
uadapter.set(types);
|
||||
}
|
||||
});
|
||||
|
||||
db.folder().liveNavigation().observe(this, new Observer<List<TupleFolderNav>>() {
|
||||
@Override
|
||||
public void onChanged(List<TupleFolderNav> folders) {
|
||||
@@ -946,6 +961,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
getSupportFragmentManager().popBackStack("messages", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putString("type", intent.getStringExtra("type"));
|
||||
args.putLong("account", intent.getLongExtra("account", -1));
|
||||
args.putLong("folder", intent.getLongExtra("folder", -1));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user