cleanup unused tabs

This commit is contained in:
B. Petersen
2019-05-19 15:51:24 +02:00
parent c277a9f6fc
commit 7cc7b26796
2 changed files with 12 additions and 6 deletions
+3 -1
View File
@@ -10,6 +10,8 @@
android:id="@+id/menu_add_attachment" />
<item android:id="@+id/menu_show_map"
android:title="@string/menu_show_map" />
android:title="@string/menu_show_map"
android:icon="?menu_map_icon"
app:showAsAction="ifRoom" />
</menu>
@@ -146,15 +146,15 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity {
}
}
if(!isGlobalProfile()) {
if(!isGlobalProfile() && !isSelfProfile()) {
tabs.add(TAB_SETTINGS);
}
tabs.add(TAB_GALLERY);
tabs.add(TAB_DOCS);
tabs.add(TAB_LINKS);
if(Prefs.isLocationStreamingEnabled(this)) {
tabs.add(TAB_MAP);
}
//tabs.add(TAB_LINKS);
//if(Prefs.isLocationStreamingEnabled(this)) {
// tabs.add(TAB_MAP);
//}
this.viewPager = ViewUtil.findById(this, R.id.pager);
this.toolbar = ViewUtil.findById(this, R.id.toolbar);
@@ -189,6 +189,10 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity {
return dcContact!=null && (dcChat==null || !dcChat.isGroup());
}
private boolean isSelfProfile() {
return isContactProfile() && contactId==DcContact.DC_CONTACT_ID_SELF;
}
private Recipient getRecipient() {
if(dcChat!=null) {
return dcContext.getRecipient(dcChat);