mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 04:12:08 +01:00
Added navslider entry contacts
This commit is contained in:
parent
03166de709
commit
97d075e210
7 changed files with 41 additions and 0 deletions
|
@ -381,6 +381,7 @@ public class MainActivity extends ThemedActivity
|
|||
navMenu.findItem(R.id.nav_exit).setVisible(appSettings.isVisibleInNavExit());
|
||||
navMenu.findItem(R.id.nav_activities).setVisible(appSettings.isVisibleInNavActivities());
|
||||
navMenu.findItem(R.id.nav_aspects).setVisible(appSettings.isVisibleInNavAspects());
|
||||
navMenu.findItem(R.id.nav_contacts).setVisible(appSettings.isVisibleInNavContacts());
|
||||
navMenu.findItem(R.id.nav_commented).setVisible(appSettings.isVisibleInNavCommented());
|
||||
navMenu.findItem(R.id.nav_followed_tags).setVisible(appSettings.isVisibleInNavFollowed_tags());
|
||||
navMenu.findItem(R.id.nav_about).setVisible(appSettings.isVisibleInNavHelp_license());
|
||||
|
@ -997,6 +998,14 @@ public class MainActivity extends ThemedActivity
|
|||
}
|
||||
break;
|
||||
|
||||
case R.id.nav_contacts: {
|
||||
if(WebHelper.isOnline(MainActivity.this)) {
|
||||
openDiasporaUrl(urls.getManageContactsUrl());
|
||||
} else {
|
||||
snackbarNoInternet.show();
|
||||
}
|
||||
}
|
||||
|
||||
case R.id.nav_activities: {
|
||||
if (WebHelper.isOnline(MainActivity.this)) {
|
||||
openDiasporaUrl(urls.getActivityUrl());
|
||||
|
|
|
@ -344,6 +344,10 @@ public class AppSettings {
|
|||
return getBoolean(prefApp, R.string.pref_key__visibility_nav__profile, true);
|
||||
}
|
||||
|
||||
public boolean isVisibleInNavContacts() {
|
||||
return getBoolean(prefApp, R.string.pref_key__visibility_nav__contacts, false);
|
||||
}
|
||||
|
||||
public void setPrimaryColorSettings(int base, int shade) {
|
||||
setInt(prefApp, R.string.pref_key__primary_color_base, base);
|
||||
setInt(prefApp, R.string.pref_key__primary_color_shade, shade);
|
||||
|
|
16
app/src/main/res/drawable/ic_contacts_black_24px.xml
Normal file
16
app/src/main/res/drawable/ic_contacts_black_24px.xml
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:pathData="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" />
|
||||
<path
|
||||
android:fillColor="#000000"
|
||||
android:pathData="M20 0H4v2h16V0zM4 24h16v-2H4v2zM20 4H4c-1.1 0-2 .9-2 2v12c0 1.1 .9 2 2 2h16c1.1
|
||||
0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 2.75c1.24 0 2.25 1.01 2.25 2.25s-1.01 2.25-2.25
|
||||
2.25S9.75 10.24 9.75 9 10.76 6.75 12 6.75zM17 17H7v-1.5c0-1.67 3.33-2.5 5-2.5s5
|
||||
.83 5 2.5V17z" />
|
||||
</vector>
|
|
@ -21,6 +21,11 @@
|
|||
android:icon="@drawable/ic_group_black_48px"
|
||||
android:title="@string/nav_aspects" />
|
||||
|
||||
<item
|
||||
android:id="@+id/nav_contacts"
|
||||
android:icon="@drawable/ic_contacts_black_24px"
|
||||
android:title="@string/nav_contacts" />
|
||||
|
||||
<item
|
||||
android:id="@+id/nav_activities"
|
||||
android:icon="@drawable/ic_history_black_48px"
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
<string name="pref_key__visibility_nav__aspects" translatable="false">pref_key__visibility_nav__aspects</string>
|
||||
<string name="pref_key__visibility_nav__followed_tags" translatable="false">pref_key__visibility_nav__followed_tags</string>
|
||||
<string name="pref_key__visibility_nav__profile" translatable="false">pref_key__visibility_nav__profile</string>
|
||||
<string name="pref_key__visibility_nav__contacts" translatable="false">pref_key__visibility_nav__contacts</string>
|
||||
|
||||
<!-- PodProfile -->
|
||||
<string name="pref_key__podprofile_avatar_url" translatable="false">podUserProfile_avatar</string>
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
<string name="mentions">Mentions</string>
|
||||
<string name="public_">Public</string>
|
||||
<string name="search">Search</string>
|
||||
<string name="contacts">Contacts</string>
|
||||
<string name="tor" translatable="false">Tor</string>
|
||||
|
||||
<!-- Notifications dropdown menu -->
|
||||
|
@ -68,6 +69,7 @@
|
|||
<string name="nav_help_license">About | Help</string>
|
||||
<string name="nav_followed_tags">Followed Tags</string>
|
||||
<string name="nav_public_activities">Public activities</string>
|
||||
<string name="nav_contacts" translatable="false">@string/contacts</string>
|
||||
|
||||
<string name="share__share_link_as_text">Share link as text</string>
|
||||
<string name="share__share_screenshot">Share screenshot of webpage</string>
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
android:defaultValue="true"
|
||||
android:key="@string/pref_key__visibility_nav__aspects"
|
||||
android:title="@string/nav_aspects"/>
|
||||
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/pref_key__visibility_nav__contacts"
|
||||
android:title="@string/nav_contacts" />
|
||||
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/pref_key__visibility_nav__activities"
|
||||
|
|
Loading…
Reference in a new issue