mirror of https://github.com/M66B/FairEmail.git
Show unified system folders by default
This commit is contained in:
parent
4c3250250e
commit
cbd0688582
|
@ -187,14 +187,14 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
final AdapterNavUnified uadapter = new AdapterNavUnified(this, this);
|
final AdapterNavUnified uadapter = new AdapterNavUnified(this, this);
|
||||||
rvUnified.setAdapter(uadapter);
|
rvUnified.setAdapter(uadapter);
|
||||||
|
|
||||||
boolean unified_system = prefs.getBoolean("unified_system", false);
|
boolean unified_system = prefs.getBoolean("unified_system", true);
|
||||||
ibExpanderUnified.setImageLevel(unified_system ? 0 /* less */ : 1 /* more */);
|
ibExpanderUnified.setImageLevel(unified_system ? 0 /* less */ : 1 /* more */);
|
||||||
grpUnified.setVisibility(unified_system ? View.VISIBLE : View.GONE);
|
grpUnified.setVisibility(unified_system ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
ibExpanderUnified.setOnClickListener(new View.OnClickListener() {
|
ibExpanderUnified.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
boolean unified_system = !prefs.getBoolean("unified_system", false);
|
boolean unified_system = !prefs.getBoolean("unified_system", true);
|
||||||
prefs.edit().putBoolean("unified_system", unified_system).apply();
|
prefs.edit().putBoolean("unified_system", unified_system).apply();
|
||||||
ibExpanderUnified.setImageLevel(unified_system ? 0 /* less */ : 1 /* more */);
|
ibExpanderUnified.setImageLevel(unified_system ? 0 /* less */ : 1 /* more */);
|
||||||
grpUnified.setVisibility(unified_system ? View.VISIBLE : View.GONE);
|
grpUnified.setVisibility(unified_system ? View.VISIBLE : View.GONE);
|
||||||
|
@ -421,7 +421,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
if (folders == null)
|
if (folders == null)
|
||||||
folders = new ArrayList<>();
|
folders = new ArrayList<>();
|
||||||
ibExpanderUnified.setVisibility(folders.size() > 0 ? View.VISIBLE : View.GONE);
|
ibExpanderUnified.setVisibility(folders.size() > 0 ? View.VISIBLE : View.GONE);
|
||||||
boolean unified_system = prefs.getBoolean("unified_system", false);
|
boolean unified_system = prefs.getBoolean("unified_system", true);
|
||||||
grpUnified.setVisibility(unified_system && folders.size() > 0 ? View.VISIBLE : View.GONE);
|
grpUnified.setVisibility(unified_system && folders.size() > 0 ? View.VISIBLE : View.GONE);
|
||||||
uadapter.set(folders);
|
uadapter.set(folders);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue