Improve badge and podselection colors ; Update podlist

This commit is contained in:
Gregor Santner 2017-08-13 23:02:04 +02:00
parent c988fc3bdd
commit eb0e2b0997
No known key found for this signature in database
GPG Key ID: 7E83A7834AECB009
16 changed files with 844 additions and 226 deletions

View File

@ -1,5 +1,9 @@
### v1.0.3 ### v1.0.3
- Update opoc - Update opoc
- Better visibility for counter badge
- Refactor DiasporaPod model
- Update PodList (many new pods!)
- Fix CustomTab bug
### v1.0.2 (2017-08-05) ### v1.0.2 (2017-08-05)
- Improve build script - Improve build script

View File

@ -23,8 +23,8 @@ android {
minSdkVersion version_sdk.minSdk minSdkVersion version_sdk.minSdk
targetSdkVersion version_sdk.targetSdk targetSdkVersion version_sdk.targetSdk
versionCode 22 versionCode 23
versionName "1.0.2" versionName "1.0.3"
applicationId "com.github.dfa.diaspora_android" applicationId "com.github.dfa.diaspora_android"
resValue 'string', 'app_name', "dandelion*" resValue 'string', 'app_name', "dandelion*"

View File

@ -83,6 +83,7 @@
<data android:host="diasporaaqmjixh5.onion" android:scheme="http" /> <data android:host="diasporaaqmjixh5.onion" android:scheme="http" />
<data android:host="pod.geraspora.de" android:scheme="https" /> <data android:host="pod.geraspora.de" android:scheme="https" />
<data android:host="diasp.org" android:scheme="https" /> <data android:host="diasp.org" android:scheme="https" />
<data android:host="diasporgc3d32vv4.onion" android:scheme="https" />
<data android:host="framasphere.org" android:scheme="https" /> <data android:host="framasphere.org" android:scheme="https" />
<data android:host="nerdpol.ch" android:scheme="https" /> <data android:host="nerdpol.ch" android:scheme="https" />
<data android:host="despora.de" android:scheme="https" /> <data android:host="despora.de" android:scheme="https" />
@ -223,7 +224,94 @@
<data android:host="ingtech.net" android:scheme="https" /> <data android:host="ingtech.net" android:scheme="https" />
<data android:host="mmkr.co" android:scheme="https" /> <data android:host="mmkr.co" android:scheme="https" />
<data android:host="pod.kneedrag.org" android:scheme="https" /> <data android:host="pod.kneedrag.org" android:scheme="https" />
<data android:host="spyurk.am" android:scheme="https" />
<data android:host="pod.mew.cat" android:scheme="https" /> <data android:host="pod.mew.cat" android:scheme="https" />
<data android:host="dfhz.tk" android:scheme="https" />
<data android:host="netiz.in" android:scheme="https" />
<data android:host="pod1.orobouros.net" android:scheme="https" />
<data android:host="witchcraft.ml" android:scheme="https" />
<data android:host="libellula.criptica.org" android:scheme="https" />
<data android:host="pod.datamol.org" android:scheme="https" />
<data android:host="social.berdaguermontes.eu" android:scheme="https" />
<data android:host="mh8.lat-clan.fr" android:scheme="https" />
<data android:host="dp.lumy.me" android:scheme="https" />
<data android:host="social.souvenirfromlife.fr" android:scheme="https" />
<data android:host="diaspora.mokrynskyi.com" android:scheme="https" />
<data android:host="hub.transition-regensburg.de" android:scheme="https" />
<data android:host="co.zy.lc" android:scheme="https" />
<data android:host="diaspora.treefish.org" android:scheme="https" />
<data android:host="diaspora.bke.ro" android:scheme="https" />
<data android:host="pod.sd.vc" android:scheme="https" />
<data android:host="diaspora.cxx.rocks" android:scheme="https" />
<data android:host="social.homenet.org" android:scheme="https" />
<data android:host="social.cigliola.com" android:scheme="https" />
<data android:host="friaspora.tk" android:scheme="https" />
<data android:host="pod.lasserh.dk" android:scheme="https" />
<data android:host="hubz.tk" android:scheme="https" />
<data android:host="hubzilla.kosebamse.com" android:scheme="https" />
<data android:host="driaans.nl" android:scheme="https" />
<data android:host="dispersio.us" android:scheme="https" />
<data android:host="go.lookbehind.eu" android:scheme="https" />
<data android:host="diasp.ot-si.com" android:scheme="https" />
<data android:host="diaspora.crossfamilyweb.com" android:scheme="https" />
<data android:host="hub.aoeu.me" android:scheme="https" />
<data android:host="dia.pwn.ninja" android:scheme="https" />
<data android:host="3ogsbs3vuvapgg37.onion.to" android:scheme="https" />
<data android:host="hubz.secretlair.me" android:scheme="https" />
<data android:host="got.noip.me" android:scheme="https" />
<data android:host="pod.bitcast.info" android:scheme="https" />
<data android:host="f.tschlotfeldt.de" android:scheme="https" />
<data android:host="hubloq.net" android:scheme="https" />
<data android:host="hubzilla.kneedrag.org" android:scheme="https" />
<data android:host="gesichtsbu.ch" android:scheme="https" />
<data android:host="hubzi.fraengii.de" android:scheme="https" />
<data android:host="friendica.narf.ssji.net" android:scheme="https" />
<data android:host="durohr.de" android:scheme="https" />
<data android:host="0kcg.com" android:scheme="https" />
<data android:host="aegibson.me" android:scheme="https" />
<data android:host="redmatrix.us" android:scheme="https" />
<data android:host="15o2.de" android:scheme="https" />
<data android:host="upt.social" android:scheme="https" />
<data android:host="friendica.bohrshouse.com" android:scheme="https" />
<data android:host="hubzilla.site" android:scheme="https" />
<data android:host="hubzilla.zavb.de" android:scheme="https" />
<data android:host="diaspora.aeriesguard.com" android:scheme="https" />
<data android:host="pod.cornify.de" android:scheme="https" />
<data android:host="hochminuseins.net" android:scheme="https" />
<data android:host="thecrimsontint.com" android:scheme="https" />
<data android:host="diaspora.clubelek.fr" android:scheme="https" />
<data android:host="teamhubzilla.org" android:scheme="https" />
<data android:host="diaspora.schlimme.net" android:scheme="https" />
<data android:host="www.wiwiec.com" android:scheme="https" />
<data android:host="diasp.danletard.de" android:scheme="https" />
<data android:host="libertypod.com" android:scheme="https" />
<data android:host="hubzilla.pskosinski.pl" android:scheme="https" />
<data android:host="pod.juvenesco.eu" android:scheme="https" />
<data android:host="pirati.ca" android:scheme="https" />
<data android:host="diasp.sk" android:scheme="https" />
<data android:host="f.libreden.net" android:scheme="https" />
<data android:host="pod.mausdompteur.de" android:scheme="https" />
<data android:host="diaspora.raitisoja.com" android:scheme="https" />
<data android:host="squeet.me" android:scheme="https" />
<data android:host="pod.kakise.xyz" android:scheme="https" />
<data android:host="pod.diasporacaribe.org" android:scheme="https" />
<data android:host="hub.feder8.ru" android:scheme="https" />
<data android:host="hubzilla.a-zwenkau.de" android:scheme="https" />
<data android:host="social.punkbeer.me" android:scheme="https" />
<data android:host="pod.sapient.fun" android:scheme="https" />
<data android:host="pod.phantasie.cc" android:scheme="https" />
<data android:host="diaspora.masharih.me" android:scheme="https" />
<data android:host="hub.mariovavti.com" android:scheme="https" />
<data android:host="social.patur.in" android:scheme="https" />
<data android:host="jeroenpraat.nl" android:scheme="https" />
<data android:host="grindcore.ch" android:scheme="https" />
<data android:host="pod.vixiv.net" android:scheme="https" />
<data android:host="social.deuxfleurs.fr" android:scheme="https" />
<data android:host="parlementum.net" android:scheme="https" />
<data android:host="villianbook.com" android:scheme="https" />
<data android:host="frolix8.asia" android:scheme="https" />
<data android:host="hub.vilarejo.pro.br" android:scheme="https" />
<data android:host="social.vixiv.net" android:scheme="https" />
<!--@@@ PODLIST END--> <!--@@@ PODLIST END-->
</intent-filter> </intent-filter>

View File

@ -447,7 +447,8 @@ public class MainActivity extends ThemedActivity
navMenu.findItem(R.id.nav_stream).setVisible(true); navMenu.findItem(R.id.nav_stream).setVisible(true);
navMenu.findItem(R.id.nav_statistics).setVisible(appSettings.isVisibleInNavStatistics()); navMenu.findItem(R.id.nav_statistics).setVisible(appSettings.isVisibleInNavStatistics());
navMenu.findItem(R.id.nav_reports).setVisible(appSettings.isVisibleInNavReports()); navMenu.findItem(R.id.nav_reports).setVisible(appSettings.isVisibleInNavReports());
navMenu.findItem(R.id.nav_toggle_desktop_page).setVisible(appSettings.isVisibleToggleMobileDesktop()); navMenu.findItem(R.id.nav_toggle_desktop_page).setVisible(appSettings.isVisibleInNavToggleMobileDesktop());
navMenu.findItem(R.id.nav_dandelion).setVisible(appSettings.isVisibleInNavDandelionAccount());
// Hide whole group (for logged in use) if no pod was selected // Hide whole group (for logged in use) if no pod was selected
@ -1122,6 +1123,11 @@ public class MainActivity extends ThemedActivity
} }
break; break;
case R.id.nav_dandelion: {
openDiasporaUrl(urls.getProfileUrl("48b78420923501341ef3782bcb452bd5"));
}
break;
case R.id.nav_exit: { case R.id.nav_exit: {
moveTaskToBack(true); moveTaskToBack(true);
finish(); finish();

View File

@ -177,8 +177,13 @@ public class PodSelectionFragment extends ThemedFragment implements SearchView.O
rootView.setBackgroundColor(appSettings.isAmoledColorMode() ? Color.BLACK : Color.WHITE); rootView.setBackgroundColor(appSettings.isAmoledColorMode() ? Color.BLACK : Color.WHITE);
listViewPod.setDivider(new ColorDrawable(Color.GRAY)); listViewPod.setDivider(new ColorDrawable(Color.GRAY));
listViewPod.setDividerHeight(dividerHeight); listViewPod.setDividerHeight(dividerHeight);
buttonUseCustomPod.setSupportBackgroundTintList(ColorStateList.valueOf(appSettings.isAmoledColorMode() ? Color.DKGRAY : Color.WHITE)); if (appSettings.isAmoledColorMode()) {
buttonUseCustomPod.setTextColor(appSettings.isAmoledColorMode() ? Color.WHITE : Color.BLACK); buttonUseCustomPod.setSupportBackgroundTintList(ColorStateList.valueOf(Color.DKGRAY));
buttonUseCustomPod.setTextColor(Color.WHITE);
} else {
buttonUseCustomPod.setSupportBackgroundTintList(ColorStateList.valueOf(appSettings.getAccentColor()));
buttonUseCustomPod.setTextColor(Helpers.get().shouldColorOnTopBeLight(appSettings.getAccentColor()) ? Color.WHITE : Color.BLACK);
}
} }
@Override @Override

View File

@ -6,6 +6,7 @@ import org.json.JSONObject;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@ -18,8 +19,9 @@ import java.util.List;
* DiasporaPodUrl - A Url of an DiasporaPod * DiasporaPodUrl - A Url of an DiasporaPod
* For all Classes a loading and saving to JSON method is available * For all Classes a loading and saving to JSON method is available
*/ */
@SuppressWarnings({"WeakerAccess", "unused", "SameParameterValue", "SpellCheckingInspection", "UnusedReturnValue", "JavaDoc", "FieldCanBeLocal"})
public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, Serializable { public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, Serializable {
private static final boolean EXPORT_TOJSON_ACTIVE6 = false; private static final boolean EXPORT_TOJSON_POST_COUNT_LOCAL = true;
private List<DiasporaPod> pods = new ArrayList<>(); private List<DiasporaPod> pods = new ArrayList<>();
private boolean trackMergeChanges = false; private boolean trackMergeChanges = false;
private Integer trackAddedIndexStart = -1; private Integer trackAddedIndexStart = -1;
@ -88,8 +90,8 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
if (updatePodBak.getId() != 0 && updatePod.getId() == 0) { if (updatePodBak.getId() != 0 && updatePod.getId() == 0) {
updatePod.setId(updatePodBak.getId()); updatePod.setId(updatePodBak.getId());
} }
if (updatePodBak.getActive6() != 0 && updatePod.getActive6() == 0) { if (updatePodBak.getPostCountLocal() != 0 && updatePod.getPostCountLocal() == 0) {
updatePod.setActive6(updatePodBak.getActive6()); updatePod.setPostCountLocal(updatePodBak.getPostCountLocal());
} }
if (updatePodBak.getScore() != 0 && updatePod.getScore() == 0) { if (updatePodBak.getScore() != 0 && updatePod.getScore() == 0) {
updatePod.setScore(updatePodBak.getScore()); updatePod.setScore(updatePodBak.getScore());
@ -179,12 +181,12 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
* *
*/ */
public static class DiasporaPod implements Iterable<DiasporaPodList.DiasporaPod.DiasporaPodUrl>, Comparable<DiasporaPod>, Serializable { public static class DiasporaPod implements Iterable<DiasporaPodList.DiasporaPod.DiasporaPodUrl>, Comparable<DiasporaPod>, Serializable {
private List<DiasporaPodUrl> podUrls = new ArrayList<>(); private List<DiasporaPodUrl> _podUrls = new ArrayList<>();
private List<String> mainLangs = new ArrayList<>(); private List<String> _mainLangs = new ArrayList<>();
private String name = ""; private String _name = "";
private int score = 0; private int _score = 0;
private int id = 0; private int _id = 0;
private long active6 = 0; private long _postCountLocal = 0;
public DiasporaPod() { public DiasporaPod() {
@ -199,14 +201,14 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
JSONArray jarr; JSONArray jarr;
if (json.has("name")) { if (json.has("name")) {
name = json.getString("name"); _name = json.getString("name");
} }
if (json.has("mainLangs")) { if (json.has("mainLangs")) {
jarr = json.getJSONArray("mainLangs"); jarr = json.getJSONArray("mainLangs");
for (int i = 0; i < jarr.length(); i++) { for (int i = 0; i < jarr.length(); i++) {
String val = jarr.getString(i); String val = jarr.getString(i);
if (!mainLangs.contains(val)) { if (!_mainLangs.contains(val)) {
mainLangs.add(val); _mainLangs.add(val);
} }
} }
} }
@ -214,19 +216,19 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
jarr = json.getJSONArray("podUrls"); jarr = json.getJSONArray("podUrls");
for (int i = 0; i < jarr.length(); i++) { for (int i = 0; i < jarr.length(); i++) {
DiasporaPodUrl podUrl = new DiasporaPodUrl().fromJson(jarr.getJSONObject(i)); DiasporaPodUrl podUrl = new DiasporaPodUrl().fromJson(jarr.getJSONObject(i));
if (!podUrls.contains(podUrl)) { if (!_podUrls.contains(podUrl)) {
podUrls.add(podUrl); _podUrls.add(podUrl);
} }
} }
} }
if (json.has("score")) { if (json.has("score")) {
score = json.getInt("score"); _score = json.getInt("score");
} }
if (json.has("active6")) { if (json.has("postCountLocal")) {
active6 = json.getLong("active6"); _postCountLocal = json.getLong("postCountLocal");
} }
if (json.has("id")) { if (json.has("id")) {
id = json.getInt("id"); _id = json.getInt("id");
} }
return this; return this;
} }
@ -236,25 +238,28 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
*/ */
public JSONObject toJson() throws JSONException { public JSONObject toJson() throws JSONException {
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("name", name); json.put("name", _name);
json.put("score", score); json.put("id", _id);
json.put("id", id);
if (_score != 0) {
json.put("score", _score);
}
// Only export active6 (frequently changing if told to do) // Only export active6 (frequently changing if told to do)
if (EXPORT_TOJSON_ACTIVE6) { if (EXPORT_TOJSON_POST_COUNT_LOCAL && _postCountLocal > 0) {
json.put("active6", active6); json.put("postCountLocal", _postCountLocal);
} }
// Pod urls // Pod urls
JSONArray jarr = new JSONArray(); JSONArray jarr = new JSONArray();
for (DiasporaPodUrl value : podUrls) { for (DiasporaPodUrl value : _podUrls) {
jarr.put(value.toJson()); jarr.put(value.toJson());
} }
json.put("podUrls", jarr); json.put("podUrls", jarr);
// main langs // main langs
jarr = new JSONArray(); jarr = new JSONArray();
for (String value : mainLangs) { for (String value : _mainLangs) {
jarr.put(value); jarr.put(value);
} }
json.put("mainLangs", jarr); json.put("mainLangs", jarr);
@ -268,11 +273,11 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
DiasporaPod otherPod = (DiasporaPod) o; DiasporaPod otherPod = (DiasporaPod) o;
// Check if id is equal // Check if id is equal
ret = this.id != 0 && this.id == otherPod.id; ret = _id != 0 && _id == otherPod._id;
// Check if host is the same (fallback if id is 0) // Check if _host is the same (fallback if id is 0)
if (!ret) { if (!ret) {
for (DiasporaPodUrl podUrl : podUrls) { for (DiasporaPodUrl podUrl : _podUrls) {
for (DiasporaPodUrl otherPodUrl : otherPod.getPodUrls()) { for (DiasporaPodUrl otherPodUrl : otherPod.getPodUrls()) {
if (podUrl.getBaseUrl().equals(otherPodUrl.getBaseUrl())) { if (podUrl.getBaseUrl().equals(otherPodUrl.getBaseUrl())) {
ret = true; ret = true;
@ -292,45 +297,46 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
if (!myPodUrls.isEmpty() && !otherPodUrls.isEmpty()) { if (!myPodUrls.isEmpty() && !otherPodUrls.isEmpty()) {
return myPodUrls.get(0).getHost().compareTo(otherPodUrls.get(0).getHost()); return myPodUrls.get(0).getHost().compareTo(otherPodUrls.get(0).getHost());
} }
return _name.compareTo(otherPod.getName());
} }
return name.compareTo(otherPod.getName()); return _name.compareTo("");
} }
@Override @Override
public String toString() { public String toString() {
return name + "(" + id + ")"; return _name + "(" + _id + ")";
} }
/** /**
* Iterator for Iterable interface (forEach, ..) * Iterator for Iterable interface (forEach, ..)
*/ */
public Iterator<DiasporaPodUrl> iterator() { public Iterator<DiasporaPodUrl> iterator() {
return podUrls.iterator(); return _podUrls.iterator();
} }
/* /*
* Getter & Setter * Getter & Setter
*/ */
public List<DiasporaPodUrl> getPodUrls() { public List<DiasporaPodUrl> getPodUrls() {
return podUrls; return _podUrls;
} }
public DiasporaPod setPodUrls(List<DiasporaPodUrl> podUrls) { public DiasporaPod setPodUrls(List<DiasporaPodUrl> podUrls) {
this.podUrls = podUrls; _podUrls = podUrls;
return this; return this;
} }
public List<String> getMainLangs() { public List<String> getMainLangs() {
return mainLangs; return _mainLangs;
} }
public DiasporaPod setMainLangs(List<String> mainLangs) { public DiasporaPod setMainLangs(List<String> mainLangs) {
this.mainLangs = mainLangs; _mainLangs = mainLangs;
return this; return this;
} }
public DiasporaPod appendMainLangs(String... values) { public DiasporaPod appendMainLangs(String... values) {
Collections.addAll(this.mainLangs, values); _mainLangs.addAll(Arrays.asList(values));
return this; return this;
} }
@ -338,50 +344,50 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
* Returns the first DiasporaPodUrl in the list * Returns the first DiasporaPodUrl in the list
*/ */
public DiasporaPodUrl getPodUrl() { public DiasporaPodUrl getPodUrl() {
if (podUrls.size() > 0) { if (_podUrls.size() > 0) {
return podUrls.get(0); return _podUrls.get(0);
} }
return null; return null;
} }
public DiasporaPod appendPodUrls(DiasporaPodUrl... values) { public DiasporaPod appendPodUrls(DiasporaPodUrl... values) {
Collections.addAll(this.podUrls, values); _podUrls.addAll(Arrays.asList(values));
return this; return this;
} }
public String getName() { public String getName() {
return name; return _name;
} }
public DiasporaPod setName(String name) { public DiasporaPod setName(String name) {
this.name = name; _name = name;
return this; return this;
} }
public int getScore() { public int getScore() {
return score; return _score;
} }
public DiasporaPod setScore(int score) { public DiasporaPod setScore(int score) {
this.score = score; _score = score;
return this; return this;
} }
public long getActive6() { public long getPostCountLocal() {
return active6; return _postCountLocal;
} }
public DiasporaPod setActive6(long active6) { public DiasporaPod setPostCountLocal(long postCountLocal) {
this.active6 = active6; _postCountLocal = postCountLocal;
return this; return this;
} }
public int getId() { public int getId() {
return id; return _id;
} }
public DiasporaPod setId(int id) { public DiasporaPod setId(int id) {
this.id = id; _id = id;
return this; return this;
} }
@ -393,9 +399,9 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
* *
*/ */
public static class DiasporaPodUrl implements Serializable { public static class DiasporaPodUrl implements Serializable {
private String host = ""; private String _host = "";
private String protocol = "https"; private String _protocol = "https";
private Integer port = 443; private Integer _port = 443;
public DiasporaPodUrl() { public DiasporaPodUrl() {
} }
@ -407,10 +413,10 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
/** /**
* Get the base url * Get the base url
* *
* @return base url with port * @return
*/ */
public String getBaseUrl() { public String getBaseUrl() {
return protocol + "://" + host + (isPortNeeded() ? port : ""); return _protocol + "://" + _host + (isPortNeeded() ? _port : "");
} }
/** /**
@ -420,13 +426,13 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
*/ */
public DiasporaPodUrl fromJson(JSONObject json) throws JSONException { public DiasporaPodUrl fromJson(JSONObject json) throws JSONException {
if (json.has("host")) { if (json.has("host")) {
host = json.getString("host"); _host = json.getString("host");
} }
if (json.has("protocol")) { if (json.has("protocol")) {
protocol = json.getString("protocol"); _protocol = json.getString("protocol");
} }
if (json.has("port")) { if (json.has("port")) {
port = json.getInt("port"); _port = json.getInt("port");
} }
return this; return this;
} }
@ -436,12 +442,12 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
*/ */
public JSONObject toJson() throws JSONException { public JSONObject toJson() throws JSONException {
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("host", host); json.put("host", _host);
if (!protocol.equals("https")) { if (!_protocol.equals("https")) {
json.put("protocol", protocol); json.put("protocol", _protocol);
} }
if (port != 443) { if (_port != 443) {
json.put("port", port); json.put("port", _port);
} }
return json; return json;
} }
@ -467,7 +473,7 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
* Tells if the ports needs to shown * Tells if the ports needs to shown
*/ */
public boolean isPortNeeded() { public boolean isPortNeeded() {
return !((port == 80 && protocol.equals("http")) || (port == 443 && protocol.equals("https"))); return !((_port == 80 && _protocol.equals("http")) || (_port == 443 && _protocol.equals("https")));
} }
@Override @Override
@ -476,6 +482,7 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
} }
@Override @Override
@SuppressWarnings("SimplifiableIfStatement")
public boolean equals(Object o) { public boolean equals(Object o) {
if (o instanceof DiasporaPodUrl) { if (o instanceof DiasporaPodUrl) {
return getBaseUrl().equals(((DiasporaPodUrl) o).getBaseUrl()); return getBaseUrl().equals(((DiasporaPodUrl) o).getBaseUrl());
@ -487,29 +494,29 @@ public class DiasporaPodList implements Iterable<DiasporaPodList.DiasporaPod>, S
* GETTER & SETTER * GETTER & SETTER
*/ */
public String getHost() { public String getHost() {
return host; return _host;
} }
public DiasporaPodUrl setHost(String host) { public DiasporaPodUrl setHost(String host) {
this.host = host; _host = host;
return this; return this;
} }
public String getProtocol() { public String getProtocol() {
return protocol; return _protocol;
} }
public DiasporaPodUrl setProtocol(String protocol) { public DiasporaPodUrl setProtocol(String protocol) {
this.protocol = protocol; _protocol = protocol;
return this; return this;
} }
public Integer getPort() { public Integer getPort() {
return port; return _port;
} }
public DiasporaPodUrl setPort(Integer port) { public DiasporaPodUrl setPort(Integer port) {
this.port = port; _port = port;
return this; return this;
} }
} }

View File

@ -28,95 +28,80 @@ import android.graphics.Rect;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable; import android.graphics.drawable.LayerDrawable;
import android.support.v4.content.ContextCompat; import android.support.annotation.NonNull;
import com.github.dfa.diaspora_android.R; import com.github.dfa.diaspora_android.R;
import com.github.dfa.diaspora_android.util.AppSettings; import com.github.dfa.diaspora_android.util.AppSettings;
import com.github.dfa.diaspora_android.util.Helpers;
@SuppressWarnings("WeakerAccess")
public class BadgeDrawable extends Drawable { public class BadgeDrawable extends Drawable {
// Source: http://mobikul.com/adding-badge-count-on-menu-items-like-cart-notification-etc/ // Source: http://mobikul.com/adding-badge-count-on-menu-items-like-cart-notification-etc/
private static final String BADGE_VALUE_OVERFLOW = "*"; private static final String BADGE_VALUE_OVERFLOW = "*";
private Paint badgeBackground; private Paint _badgeBackground;
private Paint badgeStroke; private Paint _badgeText;
private Paint badgeText; private Rect _textRect = new Rect();
private Rect textRect = new Rect();
private String badgeValue = ""; private String _badgeValue = "";
private boolean shouldDraw; private boolean _shouldDraw;
public BadgeDrawable(Context context) { public BadgeDrawable(Context context) {
float textSize = context.getResources().getDimension(R.dimen.textsize_badge_count); float textSize = context.getResources().getDimension(R.dimen.textsize_badge_count);
AppSettings settings = AppSettings.get(); AppSettings settings = AppSettings.get();
badgeBackground = new Paint(); _badgeBackground = new Paint();
badgeBackground.setColor(settings.getAccentColor()); _badgeBackground.setColor(settings.getAccentColor());
badgeBackground.setAntiAlias(true); _badgeBackground.setAntiAlias(true);
badgeBackground.setStyle(Paint.Style.FILL); _badgeBackground.setStyle(Paint.Style.FILL);
badgeStroke = new Paint();
badgeStroke.setColor(ContextCompat.getColor(context.getApplicationContext(), R.color.colorPrimaryDark));
badgeStroke.setAntiAlias(true);
badgeStroke.setStyle(Paint.Style.FILL);
badgeText = new Paint(); _badgeText = new Paint();
badgeText.setColor(Color.WHITE); _badgeText.setColor(Helpers.get().shouldColorOnTopBeLight(settings.getAccentColor()) ? Color.WHITE : Color.BLACK);
badgeText.setTypeface(Typeface.DEFAULT); _badgeText.setTypeface(Typeface.DEFAULT);
badgeText.setTextSize(textSize); _badgeText.setTextSize(textSize);
badgeText.setAntiAlias(true); _badgeText.setAntiAlias(true);
badgeText.setTextAlign(Paint.Align.CENTER); _badgeText.setTextAlign(Paint.Align.CENTER);
} }
@Override @Override
public void draw(Canvas canvas) { public void draw(@NonNull Canvas canvas) {
if (!shouldDraw) { if (!_shouldDraw) {
return; return;
} }
Rect bounds = getBounds(); Rect bounds = getBounds();
float width = bounds.right - bounds.left; float width = bounds.right - bounds.left;
float height = bounds.bottom - bounds.top; float height = bounds.bottom - bounds.top;
float oneDp = Helpers.get().dp2px(1);
// Position the badge in the top-right quadrant of the icon. // Position the badge in the top-right quadrant of the icon.
float radius = ((Math.max(width, height) / 2)) / 2; float radius = ((Math.max(width, height) / 2)) / 2;
float centerX = (width - radius - 1) + 5; float centerX = (width - radius - 1) + oneDp * 2;
float centerY = radius - 5; float centerY = radius - 2 * oneDp;
if (badgeValue.length() <= 2) { canvas.drawCircle(centerX, centerY, (int) (radius + oneDp * 5), _badgeBackground);
// Draw badge circle.
canvas.drawCircle(centerX, centerY, (int) (radius + 7.5), badgeStroke);
canvas.drawCircle(centerX, centerY, (int) (radius + 5.5), badgeBackground);
} else {
canvas.drawCircle(centerX, centerY, (int) (radius + 8.5), badgeStroke);
canvas.drawCircle(centerX, centerY, (int) (radius + 6.5), badgeBackground);
//canvas.drawRoundRect(radius, radius, radius, radius, 10, 10, badgeBackground);
}
// Draw badge count message inside the circle. // Draw badge count message inside the circle.
badgeText.getTextBounds(badgeValue, 0, badgeValue.length(), textRect); _badgeText.getTextBounds(_badgeValue, 0, _badgeValue.length(), _textRect);
float textHeight = textRect.bottom - textRect.top; float textHeight = _textRect.bottom - _textRect.top;
float textY = centerY + (textHeight / 2f); float textY = centerY + (textHeight / 2f);
if (badgeValue.length() > 2) canvas.drawText(_badgeValue.length() > 2 ? BADGE_VALUE_OVERFLOW : _badgeValue,
canvas.drawText(BADGE_VALUE_OVERFLOW, centerX, textY, badgeText); centerX, textY, _badgeText);
else
canvas.drawText(badgeValue, centerX, textY, badgeText);
} }
/* // Sets the text to display. Badge displays a '*' if more than 2 characters
Sets the count (i.e notifications) to display. private void setBadgeText(String text) {
*/ _badgeValue = text;
public void setCount(String count) {
badgeValue = count;
// Only draw a badge if there are notifications. // Only draw a badge if the value isn't a zero
shouldDraw = !count.equalsIgnoreCase("0"); _shouldDraw = !text.equalsIgnoreCase("0");
invalidateSelf(); invalidateSelf();
} }
@Override @Override
public void setAlpha(int alpha) { public void setAlpha(int alpha) {
// do nothing
} }
@Override @Override
public void setColorFilter(ColorFilter cf) { public void setColorFilter(ColorFilter cf) {
// do nothing
} }
@Override @Override
@ -125,11 +110,11 @@ public class BadgeDrawable extends Drawable {
} }
public static void setBadgeCount(Context context, LayerDrawable icon, Integer count) { public static void setBadgeCount(Context context, LayerDrawable icon, Integer count) {
setBadgeCount(context, icon, count.toString()); setBadgeText(context, icon, count.toString());
} }
public static void setBadgeCount(Context context, LayerDrawable icon, String count) { // Max of 2 characters
public static void setBadgeText(Context context, LayerDrawable icon, String text) {
BadgeDrawable badge; BadgeDrawable badge;
// Reuse drawable if possible // Reuse drawable if possible
@ -140,7 +125,7 @@ public class BadgeDrawable extends Drawable {
badge = new BadgeDrawable(context); badge = new BadgeDrawable(context);
} }
badge.setCount(count); badge.setBadgeText(text);
icon.mutate(); icon.mutate();
icon.setDrawableByLayerId(R.id.ic_badge, badge); icon.setDrawableByLayerId(R.id.ic_badge, badge);
} }

View File

@ -341,7 +341,11 @@ public class AppSettings extends AppSettingsBase {
return getBool(_prefApp, R.string.pref_key__visibility_nav__reports, false); return getBool(_prefApp, R.string.pref_key__visibility_nav__reports, false);
} }
public boolean isVisibleToggleMobileDesktop() { public boolean isVisibleInNavDandelionAccount() {
return getBool(_prefApp, R.string.pref_key__visibility_nav__dandelion_account, false);
}
public boolean isVisibleInNavToggleMobileDesktop() {
return getBool(_prefApp, R.string.pref_key__visibility_nav__toggle_mobile_desktop, false); return getBool(_prefApp, R.string.pref_key__visibility_nav__toggle_mobile_desktop, false);
} }

View File

@ -27,7 +27,7 @@ import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod;
* Helper class that provides easy access to specific urls related to diaspora * Helper class that provides easy access to specific urls related to diaspora
* Created by vanitasvitae on 10.08.16. * Created by vanitasvitae on 10.08.16.
*/ */
@SuppressWarnings("unused") @SuppressWarnings({"unused", "SpellCheckingInspection", "SameParameterValue", "WeakerAccess"})
public class DiasporaUrlHelper { public class DiasporaUrlHelper {
private final AppSettings settings; private final AppSettings settings;
@ -151,7 +151,7 @@ public class DiasporaUrlHelper {
* @param profileId Id of the profile to be shown * @param profileId Id of the profile to be shown
* @return https://(pod-domain.tld)/people/(profileId) * @return https://(pod-domain.tld)/people/(profileId)
*/ */
public String getProfileUrl(long profileId) { public String getProfileUrl(String profileId) {
return getPodUrl() + SUBURL_PEOPLE + profileId; return getPodUrl() + SUBURL_PEOPLE + profileId;
} }

View File

@ -21,6 +21,7 @@ import android.content.pm.PackageInfo;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.graphics.Color;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
import android.net.NetworkInfo; import android.net.NetworkInfo;
@ -298,6 +299,13 @@ public class Helpers {
_context.getResources().updateConfiguration(config, null); _context.getResources().updateConfiguration(config, null);
} }
// Find out if color above the given color should be light or dark. true if light
public boolean shouldColorOnTopBeLight(int colorOnBottomInt) {
return 186 > (((0.299 * Color.red(colorOnBottomInt))
+ ((0.587 * Color.green(colorOnBottomInt))
+ (0.114 * Color.blue(colorOnBottomInt)))));
}
public float px2dp(final float px) { public float px2dp(final float px) {
return px / _context.getResources().getDisplayMetrics().density; return px / _context.getResources().getDisplayMetrics().density;
} }

View File

@ -2,14 +2,11 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/podselection__fragment__root"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:id="@+id/podselection__fragment__root" android:padding="0dp"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<Button <Button
@ -27,7 +24,10 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_below="@+id/podselection__fragment__button_use_custom_pod" android:layout_below="@+id/podselection__fragment__button_use_custom_pod"
android:choiceMode="singleChoice" /> android:choiceMode="singleChoice"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" />
</RelativeLayout> </RelativeLayout>

View File

@ -53,6 +53,11 @@
android:icon="@drawable/ic_public_black_48px" android:icon="@drawable/ic_public_black_48px"
android:title="@string/nav_public_activities" /> android:title="@string/nav_public_activities" />
<item
android:id="@+id/nav_dandelion"
android:icon="@drawable/ic_person_black_24px"
android:title="@string/dandelion" />
<item <item
android:id="@+id/nav_statistics" android:id="@+id/nav_statistics"
android:icon="@drawable/ic_timeline_black_48px" android:icon="@drawable/ic_timeline_black_48px"

View File

@ -52,6 +52,13 @@
"mainLangs": ["de"], "mainLangs": ["de"],
"id": 6695 "id": 6695
}, },
{
"score": 20,
"podUrls": [{"host": "diaspora.zone"}],
"name": "zone",
"mainLangs": [],
"id": 41976
},
{ {
"score": 20, "score": 20,
"podUrls": [ "podUrls": [
@ -67,7 +74,62 @@
"id": 6524 "id": 6524
}, },
{ {
"score": 0, "score": 20,
"podUrls": [{"host": "pod.orkz.net"}],
"name": "orkz.net",
"mainLangs": [],
"id": 41604
},
{
"score": 20,
"podUrls": [{"host": "poddery.com"}],
"name": "poddery.com",
"mainLangs": [],
"id": 36667
},
{
"score": 20,
"podUrls": [{"host": "pod.disroot.org"}],
"name": "disroot.org",
"mainLangs": [],
"id": 39828
},
{
"score": 20,
"podUrls": [{"host": "diasporabr.com.br"}],
"name": "diasporabr.com.br",
"mainLangs": [],
"id": 18248
},
{
"score": -22,
"podUrls": [{"host": "diaspora-fr.org"}],
"name": "diaspora-fr.org",
"mainLangs": [],
"id": 13909
},
{
"score": -22,
"podUrls": [{"host": "diasp.de"}],
"name": "diasp.de",
"mainLangs": ["de"],
"id": 46864
},
{
"score": 99,
"podUrls": [{"host": "diaspora.com.ar"}],
"name": "com.ar",
"mainLangs": [],
"id": 22994
},
{
"score": -22,
"podUrls": [{"host": "diasp.eu"}],
"name": "diasp.eu",
"mainLangs": [],
"id": 46423
},
{
"podUrls": [{"host": "berdaguermontes.eu"}], "podUrls": [{"host": "berdaguermontes.eu"}],
"name": "berdaguermontes.eu", "name": "berdaguermontes.eu",
"mainLangs": [], "mainLangs": [],
@ -116,7 +178,6 @@
"id": 43611 "id": 43611
}, },
{ {
"score": 0,
"podUrls": [{"host": "diapod.org"}], "podUrls": [{"host": "diapod.org"}],
"name": "diapod.org", "name": "diapod.org",
"mainLangs": [], "mainLangs": [],
@ -137,21 +198,6 @@
"id": 21452 "id": 21452
}, },
{ {
"score": -22,
"podUrls": [{"host": "diasp.de"}],
"name": "diasp.de",
"mainLangs": ["de"],
"id": 46864
},
{
"score": -22,
"podUrls": [{"host": "diasp.eu"}],
"name": "diasp.eu",
"mainLangs": [],
"id": 46423
},
{
"score": 0,
"podUrls": [{"host": "diasp.eu.com"}], "podUrls": [{"host": "diasp.eu.com"}],
"name": "diasp.eu.com", "name": "diasp.eu.com",
"mainLangs": [], "mainLangs": [],
@ -171,13 +217,6 @@
"mainLangs": ["de"], "mainLangs": ["de"],
"id": 2553 "id": 2553
}, },
{
"score": -22,
"podUrls": [{"host": "diaspora-fr.org"}],
"name": "diaspora-fr.org",
"mainLangs": [],
"id": 13909
},
{ {
"score": 20, "score": 20,
"podUrls": [{"host": "diaspora.alfter.us"}], "podUrls": [{"host": "diaspora.alfter.us"}],
@ -192,13 +231,6 @@
"mainLangs": ["de"], "mainLangs": ["de"],
"id": 8209 "id": 8209
}, },
{
"score": 20,
"podUrls": [{"host": "diaspora.com.ar"}],
"name": "com.ar",
"mainLangs": [],
"id": 22994
},
{ {
"score": 20, "score": 20,
"podUrls": [{"host": "diaspora.deadhexagon.com"}], "podUrls": [{"host": "diaspora.deadhexagon.com"}],
@ -214,7 +246,6 @@
"id": 13165 "id": 13165
}, },
{ {
"score": 0,
"podUrls": [{"host": "diaspora.dorf-post.de"}], "podUrls": [{"host": "diaspora.dorf-post.de"}],
"name": "dorf-post.de", "name": "dorf-post.de",
"mainLangs": ["de"], "mainLangs": ["de"],
@ -228,7 +259,6 @@
"id": 8690 "id": 8690
}, },
{ {
"score": 0,
"podUrls": [{"host": "diaspora.horwood.biz"}], "podUrls": [{"host": "diaspora.horwood.biz"}],
"name": "horwood.biz", "name": "horwood.biz",
"mainLangs": [], "mainLangs": [],
@ -256,7 +286,6 @@
"id": 25812 "id": 25812
}, },
{ {
"score": 0,
"podUrls": [{"host": "diaspora.kosebamse.com"}], "podUrls": [{"host": "diaspora.kosebamse.com"}],
"name": "kosebamse.com", "name": "kosebamse.com",
"mainLangs": [], "mainLangs": [],
@ -305,7 +334,6 @@
"id": 38497 "id": 38497
}, },
{ {
"score": 0,
"podUrls": [{"host": "diaspora.pingupod.de"}], "podUrls": [{"host": "diaspora.pingupod.de"}],
"name": "pingupod.de", "name": "pingupod.de",
"mainLangs": ["de"], "mainLangs": ["de"],
@ -340,7 +368,6 @@
"id": 17410 "id": 17410
}, },
{ {
"score": 0,
"podUrls": [{"host": "diaspora.retrodigital.net"}], "podUrls": [{"host": "diaspora.retrodigital.net"}],
"name": "retrodigital.net", "name": "retrodigital.net",
"mainLangs": [], "mainLangs": [],
@ -375,19 +402,11 @@
"id": 9278 "id": 9278
}, },
{ {
"score": 0,
"podUrls": [{"host": "diaspora.unixcorn.org"}], "podUrls": [{"host": "diaspora.unixcorn.org"}],
"name": "unixcorn.org", "name": "unixcorn.org",
"mainLangs": [], "mainLangs": [],
"id": 43416 "id": 43416
}, },
{
"score": 20,
"podUrls": [{"host": "diasporabr.com.br"}],
"name": "diasporabr.com.br",
"mainLangs": [],
"id": 18248
},
{ {
"score": 20, "score": 20,
"podUrls": [{"host": "diasporabrazil.org"}], "podUrls": [{"host": "diasporabrazil.org"}],
@ -396,7 +415,7 @@
"id": 42422 "id": 42422
}, },
{ {
"score": 20, "score": 51,
"podUrls": [{"host": "diasporapr.tk"}], "podUrls": [{"host": "diasporapr.tk"}],
"name": "diasporapr.tk", "name": "diasporapr.tk",
"mainLangs": [], "mainLangs": [],
@ -431,7 +450,6 @@
"id": 5948 "id": 5948
}, },
{ {
"score": 0,
"podUrls": [{"host": "failure.net"}], "podUrls": [{"host": "failure.net"}],
"name": "failure.net", "name": "failure.net",
"mainLangs": [], "mainLangs": [],
@ -550,7 +568,6 @@
"id": 2522 "id": 2522
}, },
{ {
"score": 0,
"podUrls": [{"host": "pod.8n1.org"}], "podUrls": [{"host": "pod.8n1.org"}],
"name": "8n1.org", "name": "8n1.org",
"mainLangs": [], "mainLangs": [],
@ -564,7 +581,6 @@
"id": 1176 "id": 1176
}, },
{ {
"score": 0,
"podUrls": [{"host": "pod.asap-soft.com"}], "podUrls": [{"host": "pod.asap-soft.com"}],
"name": "asap-soft.com", "name": "asap-soft.com",
"mainLangs": [], "mainLangs": [],
@ -612,13 +628,6 @@
"mainLangs": ["de"], "mainLangs": ["de"],
"id": 47570 "id": 47570
}, },
{
"score": 20,
"podUrls": [{"host": "pod.disroot.org"}],
"name": "disroot.org",
"mainLangs": [],
"id": 39828
},
{ {
"score": 20, "score": 20,
"podUrls": [{"host": "pod.gedankenausbruch.com"}], "podUrls": [{"host": "pod.gedankenausbruch.com"}],
@ -682,13 +691,6 @@
"mainLangs": [], "mainLangs": [],
"id": 31958 "id": 31958
}, },
{
"score": 20,
"podUrls": [{"host": "pod.orkz.net"}],
"name": "orkz.net",
"mainLangs": [],
"id": 41604
},
{ {
"score": 20, "score": 20,
"podUrls": [{"host": "pod.ponk.pink"}], "podUrls": [{"host": "pod.ponk.pink"}],
@ -760,14 +762,6 @@
"id": 16270 "id": 16270
}, },
{ {
"score": 20,
"podUrls": [{"host": "poddery.com"}],
"name": "poddery.com",
"mainLangs": [],
"id": 36667
},
{
"score": 0,
"podUrls": [{"host": "podricing.pw"}], "podUrls": [{"host": "podricing.pw"}],
"name": "podricing.pw", "name": "podricing.pw",
"mainLangs": [], "mainLangs": [],
@ -802,7 +796,6 @@
"id": 22166 "id": 22166
}, },
{ {
"score": 0,
"podUrls": [{"host": "shrekislove.us"}], "podUrls": [{"host": "shrekislove.us"}],
"name": "shrekislove.us", "name": "shrekislove.us",
"mainLangs": ["en"], "mainLangs": ["en"],
@ -837,7 +830,6 @@
"id": 30112 "id": 30112
}, },
{ {
"score": 0,
"podUrls": [{"host": "social.lanham.id.au"}], "podUrls": [{"host": "social.lanham.id.au"}],
"name": "lanham.id.au", "name": "lanham.id.au",
"mainLangs": [], "mainLangs": [],
@ -851,14 +843,13 @@
"id": 18258 "id": 18258
}, },
{ {
"score": 20, "score": 95,
"podUrls": [{"host": "socializer.cc"}], "podUrls": [{"host": "socializer.cc"}],
"name": "socializer.cc", "name": "socializer.cc",
"mainLangs": [], "mainLangs": [],
"id": 30584 "id": 30584
}, },
{ {
"score": 0,
"podUrls": [{"host": "spora.zone"}], "podUrls": [{"host": "spora.zone"}],
"name": "spora.zone", "name": "spora.zone",
"mainLangs": [], "mainLangs": [],
@ -949,7 +940,7 @@
"id": 33510 "id": 33510
}, },
{ {
"score": 20, "score": 39,
"podUrls": [{"host": "confetticake.club"}], "podUrls": [{"host": "confetticake.club"}],
"name": "confetticake.club", "name": "confetticake.club",
"mainLangs": [], "mainLangs": [],
@ -962,13 +953,6 @@
"mainLangs": [], "mainLangs": [],
"id": 33317 "id": 33317
}, },
{
"score": 20,
"podUrls": [{"host": "diaspora.zone"}],
"name": "zone",
"mainLangs": [],
"id": 41976
},
{ {
"score": 20, "score": 20,
"podUrls": [{"host": "pod.userzap.de"}], "podUrls": [{"host": "pod.userzap.de"}],
@ -984,47 +968,564 @@
"id": 5856 "id": 5856
}, },
{ {
"score": 0,
"podUrls": [{"host": "diaspora.punkbeer.me"}], "podUrls": [{"host": "diaspora.punkbeer.me"}],
"name": "punkbeer.me", "name": "punkbeer.me",
"mainLangs": [], "mainLangs": [],
"id": 16609 "id": 16609
}, },
{ {
"score": 0,
"podUrls": [{"host": "ingtech.net"}], "podUrls": [{"host": "ingtech.net"}],
"name": "ingtech.net", "name": "ingtech.net",
"mainLangs": [], "mainLangs": [],
"id": 13051 "id": 13051
}, },
{ {
"score": 0,
"podUrls": [{"host": "mmkr.co"}], "podUrls": [{"host": "mmkr.co"}],
"name": "mmkr.co", "name": "mmkr.co",
"mainLangs": [], "mainLangs": [],
"id": 30787 "id": 30787
}, },
{ {
"score": 0,
"podUrls": [{"host": "pod.kneedrag.org"}], "podUrls": [{"host": "pod.kneedrag.org"}],
"name": "kneedrag.org", "name": "kneedrag.org",
"mainLangs": [], "mainLangs": [],
"id": 24936 "id": 24936
}, },
{ {
"score": 0,
"podUrls": [{"host": "spyurk.am"}], "podUrls": [{"host": "spyurk.am"}],
"name": "Spyurk", "name": "Spyurk",
"mainLangs": [], "mainLangs": [],
"id": 24921 "id": 24921
}, },
{ {
"score": 0,
"podUrls": [{"host": "pod.mew.cat"}], "podUrls": [{"host": "pod.mew.cat"}],
"name": "mew.cat", "name": "mew.cat",
"mainLangs": [], "mainLangs": [],
"id": 10609 "id": 10609
},
{
"podUrls": [{"host": "dfhz.tk"}],
"name": "dfhz.tk",
"mainLangs": [],
"id": 17389
},
{
"podUrls": [{"host": "netiz.in"}],
"name": "netiz.in",
"mainLangs": ["in"],
"id": 26206
},
{
"score": 98,
"podUrls": [{"host": "pod1.orobouros.net"}],
"name": "pod1.orobouros.net",
"mainLangs": [],
"id": 41891
},
{
"podUrls": [{"host": "witchcraft.ml"}],
"name": "witchcraft.ml",
"mainLangs": [],
"id": 37791
},
{
"score": 40,
"podUrls": [{"host": "libellula.criptica.org"}],
"name": "libellula.criptica.org",
"mainLangs": [],
"id": 36850
},
{
"podUrls": [{"host": "pod.datamol.org"}],
"name": "datamol.org",
"mainLangs": [],
"id": 31476
},
{
"podUrls": [{"host": "social.berdaguermontes.eu"}],
"name": "berdaguermontes.eu",
"mainLangs": [],
"id": 47620
},
{
"podUrls": [{"host": "mh8.lat-clan.fr"}],
"name": "mh8.lat-clan.fr",
"mainLangs": ["fr"],
"id": 25711
},
{
"score": 55,
"podUrls": [{"host": "dp.lumy.me"}],
"name": "dp.lumy.me",
"mainLangs": [],
"id": 37629
},
{
"podUrls": [{"host": "social.souvenirfromlife.fr"}],
"name": "souvenirfromlife.fr",
"mainLangs": ["fr"],
"id": 22180
},
{
"podUrls": [{"host": "diaspora.mokrynskyi.com"}],
"name": "mokrynskyi.com",
"mainLangs": [],
"id": 24363
},
{
"score": 40,
"podUrls": [{"host": "hub.transition-regensburg.de"}],
"name": "hub.transition-regensburg.de",
"mainLangs": ["de"],
"id": 3300
},
{
"podUrls": [{"host": "co.zy.lc"}],
"name": "co.zy.lc",
"mainLangs": [],
"id": 31291
},
{
"podUrls": [{"host": "diaspora.treefish.org"}],
"name": "treefish.org",
"mainLangs": [],
"id": 37210
},
{
"podUrls": [{"host": "diaspora.bke.ro"}],
"name": "bke.ro",
"mainLangs": [],
"id": 43350
},
{
"podUrls": [{"host": "pod.sd.vc"}],
"name": "sd.vc",
"mainLangs": [],
"id": 3302
},
{
"podUrls": [{"host": "diaspora.cxx.rocks"}],
"name": "cxx.rocks",
"mainLangs": [],
"id": 20172
},
{
"podUrls": [{"host": "social.homenet.org"}],
"name": "homenet.org",
"mainLangs": [],
"id": 48291
},
{
"podUrls": [{"host": "social.cigliola.com"}],
"name": "cigliola.com",
"mainLangs": [],
"id": 31082
},
{
"podUrls": [{"host": "friaspora.tk"}],
"name": "friaspora.tk",
"mainLangs": [],
"id": 32711
},
{
"podUrls": [{"host": "pod.lasserh.dk"}],
"name": "lasserh.dk",
"mainLangs": [],
"id": 29141
},
{
"podUrls": [{"host": "hubz.tk"}],
"name": "hubz.tk",
"mainLangs": [],
"id": 31332
},
{
"podUrls": [{"host": "hubzilla.kosebamse.com"}],
"name": "hubzilla.kosebamse.com",
"mainLangs": [],
"id": 19953
},
{
"podUrls": [{"host": "driaans.nl"}],
"name": "driaans.nl",
"mainLangs": ["nl"],
"id": 6488
},
{
"podUrls": [{"host": "dispersio.us"}],
"name": "dispersio.us",
"mainLangs": ["en"],
"id": 9
},
{
"podUrls": [{"host": "go.lookbehind.eu"}],
"name": "go.lookbehind.eu",
"mainLangs": [],
"id": 39260
},
{
"podUrls": [{"host": "diasp.ot-si.com"}],
"name": "diasp.ot-si.com",
"mainLangs": [],
"id": 1100
},
{
"score": 99,
"podUrls": [{"host": "diaspora.crossfamilyweb.com"}],
"name": "crossfamilyweb.com",
"mainLangs": [],
"id": 10816
},
{
"podUrls": [{"host": "hub.aoeu.me"}],
"name": "hub.aoeu.me",
"mainLangs": [],
"id": 22535
},
{
"podUrls": [{"host": "dia.pwn.ninja"}],
"name": "dia.pwn.ninja",
"mainLangs": [],
"id": 41416
},
{
"podUrls": [{"host": "3ogsbs3vuvapgg37.onion.to"}],
"name": "3ogsbs3vuvapgg37.onion.to",
"mainLangs": [],
"id": 43975
},
{
"podUrls": [{"host": "hubz.secretlair.me"}],
"name": "hubz.secretlair.me",
"mainLangs": [],
"id": 31412
},
{
"podUrls": [{"host": "got.noip.me"}],
"name": "got.noip.me",
"mainLangs": [],
"id": 24638
},
{
"podUrls": [{"host": "pod.bitcast.info"}],
"name": "bitcast.info",
"mainLangs": [],
"id": 31132
},
{
"podUrls": [{"host": "f.tschlotfeldt.de"}],
"name": "f.tschlotfeldt.de",
"mainLangs": ["de"],
"id": 12221
},
{
"podUrls": [{"host": "hubloq.net"}],
"name": "hubloq.net",
"mainLangs": [],
"id": 41618
},
{
"podUrls": [{"host": "hubzilla.kneedrag.org"}],
"name": "hubzilla.kneedrag.org",
"mainLangs": [],
"id": 38463
},
{
"podUrls": [{"host": "gesichtsbu.ch"}],
"name": "gesichtsbu.ch",
"mainLangs": ["de"],
"id": 47552
},
{
"podUrls": [{"host": "hubzi.fraengii.de"}],
"name": "hubzi.fraengii.de",
"mainLangs": ["de"],
"id": 40845
},
{
"podUrls": [{"host": "friendica.narf.ssji.net"}],
"name": "friendica.narf.ssji.net",
"mainLangs": [],
"id": 37056
},
{
"podUrls": [{"host": "durohr.de"}],
"name": "durohr.de",
"mainLangs": ["de"],
"id": 48207
},
{
"podUrls": [{"host": "0kcg.com"}],
"name": "0kcg.com",
"mainLangs": [],
"id": 9891
},
{
"podUrls": [{"host": "aegibson.me"}],
"name": "aegibson.me",
"mainLangs": [],
"id": 45381
},
{
"podUrls": [{"host": "redmatrix.us"}],
"name": "redmatrix.us",
"mainLangs": ["en"],
"id": 28470
},
{
"podUrls": [{"host": "15o2.de"}],
"name": "15o2.de",
"mainLangs": ["de"],
"id": 10262
},
{
"podUrls": [{"host": "upt.social"}],
"name": "upt.social",
"mainLangs": [],
"id": 22385
},
{
"podUrls": [{"host": "friendica.bohrshouse.com"}],
"name": "friendica.bohrshouse.com",
"mainLangs": [],
"id": 9771
},
{
"podUrls": [{"host": "hubzilla.site"}],
"name": "hubzilla.site",
"mainLangs": [],
"id": 12050
},
{
"podUrls": [{"host": "hubzilla.zavb.de"}],
"name": "hubzilla.zavb.de",
"mainLangs": ["de"],
"id": 16156
},
{
"podUrls": [{"host": "diaspora.aeriesguard.com"}],
"name": "aeriesguard.com",
"mainLangs": [],
"id": 25987
},
{
"podUrls": [{"host": "pod.cornify.de"}],
"name": "cornify.de",
"mainLangs": ["de"],
"id": 46021
},
{
"podUrls": [{"host": "hochminuseins.net"}],
"name": "hochminuseins.net",
"mainLangs": [],
"id": 27013
},
{
"podUrls": [{"host": "thecrimsontint.com"}],
"name": "thecrimsontint.com",
"mainLangs": [],
"id": 44004
},
{
"podUrls": [{"host": "diaspora.clubelek.fr"}],
"name": "clubelek.fr",
"mainLangs": ["fr"],
"id": 48494
},
{
"podUrls": [{"host": "teamhubzilla.org"}],
"name": "teamhubzilla.org",
"mainLangs": [],
"id": 35346
},
{
"podUrls": [{"host": "diaspora.schlimme.net"}],
"name": "schlimme.net",
"mainLangs": [],
"id": 33506
},
{
"podUrls": [{"host": "www.wiwiec.com"}],
"name": "wiwiec.com",
"mainLangs": [],
"id": 14764
},
{
"podUrls": [{"host": "diasp.danletard.de"}],
"name": "diasp.danletard.de",
"mainLangs": ["de"],
"id": 38252
},
{
"podUrls": [{"host": "libertypod.com"}],
"name": "libertypod.com",
"mainLangs": [],
"id": 47484
},
{
"podUrls": [{"host": "hubzilla.pskosinski.pl"}],
"name": "hubzilla.pskosinski.pl",
"mainLangs": [],
"id": 49996
},
{
"podUrls": [{"host": "pod.juvenesco.eu"}],
"name": "juvenesco.eu",
"mainLangs": [],
"id": 35432
},
{
"score": 99,
"podUrls": [{"host": "pirati.ca"}],
"name": "pirati.ca",
"mainLangs": [],
"id": 7832
},
{
"podUrls": [{"host": "diasp.sk"}],
"name": "diasp.sk",
"mainLangs": [],
"id": 42123
},
{
"podUrls": [{"host": "f.libreden.net"}],
"name": "f.libreden.net",
"mainLangs": [],
"id": 28236
},
{
"podUrls": [{"host": "pod.mausdompteur.de"}],
"name": "mausdompteur.de",
"mainLangs": ["de"],
"id": 22517
},
{
"podUrls": [{"host": "diaspora.raitisoja.com"}],
"name": "raitisoja.com",
"mainLangs": [],
"id": 13163
},
{
"score": 99,
"podUrls": [{"host": "squeet.me"}],
"name": "squeet.me",
"mainLangs": [],
"id": 33979
},
{
"podUrls": [{"host": "pod.kakise.xyz"}],
"name": "kakise.xyz",
"mainLangs": [],
"id": 15607
},
{
"podUrls": [{"host": "pod.diasporacaribe.org"}],
"name": "diasporacaribe.org",
"mainLangs": [],
"id": 5615
},
{
"podUrls": [{"host": "hub.feder8.ru"}],
"name": "hub.feder8.ru",
"mainLangs": ["ru"],
"id": 451
},
{
"podUrls": [{"host": "hubzilla.a-zwenkau.de"}],
"name": "hubzilla.a-zwenkau.de",
"mainLangs": ["de"],
"id": 973
},
{
"podUrls": [{"host": "social.punkbeer.me"}],
"name": "punkbeer.me",
"mainLangs": [],
"id": 9210
},
{
"podUrls": [{"host": "pod.sapient.fun"}],
"name": "sapient.fun",
"mainLangs": [],
"id": 12715
},
{
"podUrls": [{"host": "pod.phantasie.cc"}],
"name": "phantasie.cc",
"mainLangs": [],
"id": 17966
},
{
"podUrls": [{"host": "diaspora.masharih.me"}],
"name": "masharih.me",
"mainLangs": [],
"id": 33148
},
{
"podUrls": [{"host": "hub.mariovavti.com"}],
"name": "hub.mariovavti.com",
"mainLangs": [],
"id": 43393
},
{
"podUrls": [{"host": "social.patur.in"}],
"name": "patur.in",
"mainLangs": ["in"],
"id": 35985
},
{
"podUrls": [{"host": "jeroenpraat.nl"}],
"name": "jeroenpraat.nl",
"mainLangs": ["nl"],
"id": 12243
},
{
"podUrls": [{"host": "grindcore.ch"}],
"name": "grindcore.ch",
"mainLangs": ["de"],
"id": 8505
},
{
"podUrls": [{"host": "pod.vixiv.net"}],
"name": "vixiv.net",
"mainLangs": [],
"id": 22599
},
{
"podUrls": [{"host": "social.deuxfleurs.fr"}],
"name": "deuxfleurs.fr",
"mainLangs": ["fr"],
"id": 19227
},
{
"podUrls": [{"host": "parlementum.net"}],
"name": "parlementum.net",
"mainLangs": [],
"id": 8591
},
{
"podUrls": [{"host": "villianbook.com"}],
"name": "villianbook.com",
"mainLangs": [],
"id": 40782
},
{
"podUrls": [{"host": "frolix8.asia"}],
"name": "frolix8.asia",
"mainLangs": [],
"id": 14385
},
{
"podUrls": [{"host": "hub.vilarejo.pro.br"}],
"name": "hub.vilarejo.pro.br",
"mainLangs": [],
"id": 45914
},
{
"podUrls": [{"host": "social.vixiv.net"}],
"name": "vixiv.net",
"mainLangs": [],
"id": 13922
} }
], ],
"timestamp": 1481906950869 "timestamp": 1502656297127
} }

View File

@ -11,6 +11,6 @@
https://developer.android.com/design/patterns/navigation-drawer.html --> https://developer.android.com/design/patterns/navigation-drawer.html -->
<dimen name="textsize_badge_count">11sp</dimen> <dimen name="textsize_badge_count">13sp</dimen>
<dimen name="color_picker_circle_size">30dp</dimen> <dimen name="color_picker_circle_size">30dp</dimen>
</resources> </resources>

View File

@ -93,6 +93,7 @@
<string name="pref_key__visibility_nav__reports" translatable="false">pref_key__visibility_nav__reports</string> <string name="pref_key__visibility_nav__reports" translatable="false">pref_key__visibility_nav__reports</string>
<string name="pref_key__visibility_nav__statistics" translatable="false">pref_key__visibility_nav__statistics</string> <string name="pref_key__visibility_nav__statistics" translatable="false">pref_key__visibility_nav__statistics</string>
<string name="pref_key__visibility_nav__toggle_mobile_desktop" translatable="false">pref_key__visibility_nav__toggle_mobile_desktop</string> <string name="pref_key__visibility_nav__toggle_mobile_desktop" translatable="false">pref_key__visibility_nav__toggle_mobile_desktop</string>
<string name="pref_key__visibility_nav__dandelion_account" translatable="false">pref_key__visibility_nav__dandelion_account</string>
<!-- PodProfile --> <!-- PodProfile -->
<string name="pref_key__podprofile_avatar_url" translatable="false">pref_key__podprofile_avatar_url</string> <string name="pref_key__podprofile_avatar_url" translatable="false">pref_key__podprofile_avatar_url</string>

View File

@ -40,6 +40,10 @@
android:defaultValue="false" android:defaultValue="false"
android:key="@string/pref_key__visibility_nav__public_activities" android:key="@string/pref_key__visibility_nav__public_activities"
android:title="@string/nav_public_activities"/> android:title="@string/nav_public_activities"/>
<com.github.dfa.diaspora_android.ui.theme.ThemedVisibilityPreference
android:defaultValue="false"
android:key="@string/pref_key__visibility_nav__dandelion_account"
android:title="@string/dandelion"/>
</com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory> </com.github.dfa.diaspora_android.ui.theme.ThemedPreferenceCategory>