mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 22:56:33 +02:00
Added setting to enable/disabled unified inbox
This commit is contained in:
@@ -98,6 +98,8 @@ import androidx.lifecycle.ViewModelProviders;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
public class ActivityView extends ActivityBilling implements FragmentManager.OnBackStackChangedListener {
|
||||
private boolean unified;
|
||||
|
||||
private View view;
|
||||
private DrawerLayout drawerLayout;
|
||||
private Group grpPane;
|
||||
@@ -138,6 +140,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
unified = prefs.getBoolean("unified", true);
|
||||
|
||||
view = LayoutInflater.from(this).inflate(R.layout.activity_view, null);
|
||||
setContentView(view);
|
||||
|
||||
@@ -299,11 +304,8 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
});
|
||||
|
||||
if (getSupportFragmentManager().getFragments().size() == 0) {
|
||||
Bundle args = new Bundle();
|
||||
args.putLong("folder", -1);
|
||||
|
||||
FragmentMessages fragment = new FragmentMessages();
|
||||
fragment.setArguments(args);
|
||||
FragmentEx fragment = (unified ? new FragmentMessages() : new FragmentFolders());
|
||||
fragment.setArguments(new Bundle());
|
||||
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("unified");
|
||||
|
||||
Reference in New Issue
Block a user