diff --git a/.gitignore b/.gitignore
index d4dfb2ef..ed1538b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ app/src/main/res/raw/contributors.md
app/src/main/res/raw/license.md
app/src/main/res/raw/readme.md
app/src/main/res/raw/contributors.txt
+app/src/main/res/raw/podlist.json
##############
### Common ###
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index 1bdb3c08..63761195 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -11,5 +11,7 @@
Abhijith Balan (abhijithb21 AT openmailbox DOT org): Malayalam translation
Airon90 (https://diasp.eu/u/airon90): Italian translation
Gaukler Faun (https://github.com/scoute-dich): Diaspora Native WebApp additions
-Martín Vukovic (martinvukovic@protonmail.com): Diaspora Native WebApp
+Martín Vukovic (martinvukovic AT protonmail DOT com): Diaspora Native WebApp
+Nacho Fernández (nacho_f AT joindiaspora DOT com): Spanish translation
+pskosinski (email AT pskosinski DOT pl): Polish translation
SansPseudoFix (https://github.com/SansPseudoFix): French translation
diff --git a/README.md b/README.md
index 3ef91253..cc8704d6 100644
--- a/README.md
+++ b/README.md
@@ -41,6 +41,3 @@ Diaspora for Android requires access to the Internet and to external storage to
## Maintainers
- gsantner ([GitHub](https://github.com/gsantner), [Web](https://gsantner.github.io), [diaspora*](https://pod.geraspora.de/people/d1cbdd70095301341e834860008dbc6c))
- vanitasvitae ([GitHub](https://github.com/vanitasvitae), [Diaspora](https://pod.geraspora.de/people/bbd7af90fbec013213e34860008dbc6c))
-
-## Acknowledgements
-- We took some inspiration and code from [LeafPic](https://github.com/HoraApps/LeafPic), big thanks to Donald Shtjefni and the LeafPic Team!
diff --git a/app/build.gradle b/app/build.gradle
index 39d4444b..dee4cfe9 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -9,11 +9,11 @@ android {
applicationId "com.github.dfa.diaspora_android"
minSdkVersion 17
targetSdkVersion 24
- versionCode 8
- versionName "0.1.6-next"
+ versionCode 10
+ versionName "0.2.0-next"
setProperty("archivesBaseName", "diasporaAndroid__${versionName}__")
- vectorDrawables.useSupportLibrary=true
+ vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
@@ -27,10 +27,10 @@ android {
}
}
+// Additional repositories
repositories {
maven {
- //Color picker
- url "http://dl.bintray.com/dasar/maven"
+ url "http://dl.bintray.com/dasar/maven" //Color picker
}
}
@@ -44,23 +44,32 @@ dependencies {
// Android standard libs
compile 'com.android.support:appcompat-v7:24.2.1'
- compile 'com.android.support:design:24.1.0' //Don't update. Broken up to 24.2.1
+ compile 'com.android.support:design:24.1.0' //Don't update. Broken up to 25.0.0
compile 'com.android.support:support-v4:24.2.1'
- compile "com.android.support:customtabs:24.2.1"
+ compile 'com.android.support:customtabs:24.2.1'
// More libraries
compile 'com.jakewharton:butterknife:8.0.1'
compile 'info.guardianproject.netcipher:netcipher:2.0.0-alpha1'
compile 'info.guardianproject.netcipher:netcipher-webkit:2.0.0-alpha1'
- compile(group: 'uz.shift', name: 'colorpicker', version: '0.5', ext: 'aar') //Color picker
+ compile(group: 'uz.shift', name: 'colorpicker', version: '0.5', ext: 'aar')
apt 'com.jakewharton:butterknife-compiler:8.0.1'
}
+// #####################
+// Groovy Coding Area
+// #####################
+final String RAW_DIR = "app/src/main/res/raw"
+final String[] ROOT_TO_RAW_COPYFILES = ["README.md", "LICENSE.md", "CHANGELOG.md", "CONTRIBUTORS.txt"]
+final String PODLIST_URL = 'https://raw.githubusercontent.com/Diaspora-for-Android/diaspora-android-extras/master/podList/podlist.json'
+final String PODLIST_PATH = "${RAW_DIR}/podlist.json"
+// Called before building
task copyRepoFiles(type: Copy) {
- String[] copyFiles = ["README.md", "LICENSE.md", "CHANGELOG.md"]
- from rootProject.files(copyFiles)
- into 'src/main/res/raw'
+
+ // Copy files over to raw dir
+ from rootProject.files(ROOT_TO_RAW_COPYFILES)
+ into RAW_DIR.replaceFirst("app/", "")
rename { String fileName ->
fileName.replace(fileName, fileName.toLowerCase())
}
@@ -76,5 +85,39 @@ task copyRepoFiles(type: Copy) {
}
}
+ // Download PodList
+ downloadFile(PODLIST_PATH, PODLIST_URL, false)
+
+ // Application variants
+ android.applicationVariants.all { v ->
+ // Do if we build in release (signed apk) mode
+ if (v.buildType.name == "release") {
+ downloadFile(PODLIST_PATH, PODLIST_URL, true)
+ }
+ }
}
+
+<<<<<<< HEAD
+def downloadFile(filePath, url, downloadIfExists ) {
+ def f = new File(filePath)
+ if (f.exists() && downloadIfExists){
+ f.delete();
+ }
+ if (!f.exists()) {
+ new URL(url).withInputStream{ i -> f.withOutputStream{ it << i }}
+ }
+}
+
tasks.copyRepoFiles.execute()
+=======
+// Downloads a file
+def downloadFile(filePath, url, downloadIfExists) {
+ def f = new File(filePath)
+ f.exists() && downloadIfExists && f.delete();
+ if (!f.exists()) {
+ new URL(url).withInputStream { i -> f.withOutputStream { it << i } }
+ }
+}
+
+tasks.copyRepoFiles.execute()
+>>>>>>> master
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index d78beabb..fe8e3163 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -75,12 +75,9 @@
-
-
-
@@ -99,17 +96,14 @@
-
-
-
@@ -122,101 +116,68 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -227,7 +188,6 @@
-
@@ -236,7 +196,6 @@
-
@@ -244,11 +203,9 @@
-
-
diff --git a/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java b/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java
index 72661e1b..bd7f4b35 100644
--- a/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java
+++ b/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java
@@ -34,7 +34,6 @@ import android.support.customtabs.CustomTabsSession;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.NavigationView;
import android.support.design.widget.Snackbar;
-import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.content.LocalBroadcastManager;
import android.support.v4.view.GravityCompat;
@@ -398,6 +397,7 @@ public class MainActivity extends ThemedActivity
navMenu.findItem(R.id.nav_profile).setVisible(appSettings.isVisibleInNavProfile());
navMenu.findItem(R.id.nav_public).setVisible(appSettings.isVisibleInNavPublic_activities());
navMenu.findItem(R.id.nav_stream).setVisible(true);
+ navMenu.findItem(R.id.nav_reports).setVisible(appSettings.isVisibleInNavReports());
// Hide whole group (for logged in use) if no pod was selected
@@ -462,7 +462,7 @@ public class MainActivity extends ThemedActivity
@Override
public void run() {
ContextMenuWebView wv = ((DiasporaStreamFragment) getFragment(DiasporaStreamFragment.TAG)).getWebView();
- if(wv != null) {
+ if (wv != null) {
wv.clearCache(true);
}
}
@@ -486,7 +486,7 @@ public class MainActivity extends ThemedActivity
return;
}
//Catch split screen recreation
- if(action.equals(Intent.ACTION_MAIN) && getTopFragment() != null) {
+ if (action.equals(Intent.ACTION_MAIN) && getTopFragment() != null) {
return;
}
@@ -581,7 +581,7 @@ public class MainActivity extends ThemedActivity
LocalBroadcastManager.getInstance(this).registerReceiver(brOpenExternalLink, new IntentFilter(ACTION_OPEN_EXTERNAL_URL));
invalidateOptionsMenu();
this.appSettings = getAppSettings();
- if(appSettings.isIntellihideToolbars()) {
+ if (appSettings.isIntellihideToolbars()) {
enableToolbarHiding();
} else {
disableToolbarHiding();
@@ -1028,8 +1028,8 @@ public class MainActivity extends ThemedActivity
} else {
snackbarNoInternet.show();
}
- break;
}
+ break;
case R.id.nav_public: {
if (WebHelper.isOnline(MainActivity.this)) {
@@ -1037,14 +1037,24 @@ public class MainActivity extends ThemedActivity
} else {
snackbarNoInternet.show();
}
- break;
}
+ break;
+
+ case R.id.nav_reports: {
+ AppLog.d(this, "NAV_REPORTS!");
+ if(WebHelper.isOnline(MainActivity.this)) {
+ openDiasporaUrl(urls.getReportsUrl());
+ } else {
+ snackbarNoInternet.show();
+ }
+ }
+ break;
case R.id.nav_exit: {
moveTaskToBack(true);
finish();
- break;
}
+ break;
case R.id.nav_settings: {
startActivity(new Intent(this, SettingsActivity.class));
diff --git a/app/src/main/java/com/github/dfa/diaspora_android/activity/SettingsActivity.java b/app/src/main/java/com/github/dfa/diaspora_android/activity/SettingsActivity.java
index 268c11a1..b1c599d2 100644
--- a/app/src/main/java/com/github/dfa/diaspora_android/activity/SettingsActivity.java
+++ b/app/src/main/java/com/github/dfa/diaspora_android/activity/SettingsActivity.java
@@ -131,9 +131,9 @@ public class SettingsActivity extends ThemedActivity {
@Override
public void onBackPressed() {
ThemedPreferenceFragment top = getTopFragment();
- if(top != null && top.getFragmentTag().equals(SettingsFragmentProxy.TAG)) {
+ if (top != null && top.getFragmentTag().equals(SettingsFragmentProxy.TAG)) {
ProxyHandler.ProxySettings newProxySettings = getAppSettings().getProxySettings();
- if(oldProxySettings.isEnabled() && !newProxySettings.isEnabled()) {
+ if (oldProxySettings.isEnabled() && !newProxySettings.isEnabled()) {
Toast.makeText(this, R.string.toast__proxy_disabled__restart_required, Toast.LENGTH_LONG).show();
}
}
diff --git a/app/src/main/java/com/github/dfa/diaspora_android/listener/DiasporaUserProfileChangedListener.java b/app/src/main/java/com/github/dfa/diaspora_android/listener/DiasporaUserProfileChangedListener.java
index 4de59701..5b748875 100644
--- a/app/src/main/java/com/github/dfa/diaspora_android/listener/DiasporaUserProfileChangedListener.java
+++ b/app/src/main/java/com/github/dfa/diaspora_android/listener/DiasporaUserProfileChangedListener.java
@@ -27,29 +27,33 @@ import com.github.dfa.diaspora_android.data.DiasporaUserProfile;
public interface DiasporaUserProfileChangedListener {
/**
* Called when the DiasporaUserProfile name changed
+ *
* @param diasporaUserProfile The profile
- * @param name The new name
+ * @param name The new name
*/
void onUserProfileNameChanged(DiasporaUserProfile diasporaUserProfile, String name);
/**
* Called when the DiasporaUserProfile avatarUrl changed
+ *
* @param diasporaUserProfile The profile
- * @param avatarUrl The new name
+ * @param avatarUrl The new name
*/
void onUserProfileAvatarChanged(DiasporaUserProfile diasporaUserProfile, String avatarUrl);
/**
* Called when the DiasporaUserProfile notificationCount changed
+ *
* @param diasporaUserProfile The profile
- * @param notificationCount The new notificationCount
+ * @param notificationCount The new notificationCount
*/
void onNotificationCountChanged(DiasporaUserProfile diasporaUserProfile, int notificationCount);
/**
* Called when the DiasporaUserProfile unreadMessageCount changed
+ *
* @param diasporaUserProfile The profile
- * @param unreadMessageCount The new unreadMessageCount
+ * @param unreadMessageCount The new unreadMessageCount
*/
void onUnreadMessageCountChanged(DiasporaUserProfile diasporaUserProfile, int unreadMessageCount);
}
diff --git a/app/src/main/java/com/github/dfa/diaspora_android/util/AppSettings.java b/app/src/main/java/com/github/dfa/diaspora_android/util/AppSettings.java
index 668ee668..be0844f3 100644
--- a/app/src/main/java/com/github/dfa/diaspora_android/util/AppSettings.java
+++ b/app/src/main/java/com/github/dfa/diaspora_android/util/AppSettings.java
@@ -19,9 +19,9 @@ import android.content.Context;
import android.content.SharedPreferences;
import com.github.dfa.diaspora_android.R;
+import com.github.dfa.diaspora_android.data.DiasporaAspect;
import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod;
import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod.DiasporaPodUrl;
-import com.github.dfa.diaspora_android.data.DiasporaAspect;
import com.github.dfa.diaspora_android.web.ProxyHandler;
import org.json.JSONException;
@@ -329,7 +329,7 @@ public class AppSettings {
}
public boolean isLoggingEnabled() {
- return getBoolean(prefApp, R.string.pref_key__logging_enabled, true);
+ return getBoolean(prefApp, R.string.pref_key__logging_enabled, false);
}
public boolean isLoggingSpamEnabled() {
@@ -380,6 +380,10 @@ public class AppSettings {
return getBoolean(prefApp, R.string.pref_key__visibility_nav__contacts, false);
}
+ public boolean isVisibleInNavReports() {
+ return getBoolean(prefApp, R.string.pref_key__visibility_nav__reports, 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);
diff --git a/app/src/main/java/com/github/dfa/diaspora_android/util/DiasporaUrlHelper.java b/app/src/main/java/com/github/dfa/diaspora_android/util/DiasporaUrlHelper.java
index 10edd275..ce312a6d 100644
--- a/app/src/main/java/com/github/dfa/diaspora_android/util/DiasporaUrlHelper.java
+++ b/app/src/main/java/com/github/dfa/diaspora_android/util/DiasporaUrlHelper.java
@@ -20,8 +20,8 @@ package com.github.dfa.diaspora_android.util;
import com.github.dfa.diaspora_android.App;
import com.github.dfa.diaspora_android.R;
-import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod;
import com.github.dfa.diaspora_android.data.DiasporaAspect;
+import com.github.dfa.diaspora_android.data.DiasporaPodList.DiasporaPod;
/**
* Helper class that provides easy access to specific urls related to diaspora
@@ -60,6 +60,7 @@ public class DiasporaUrlHelper {
public static final String SUBURL_NOTIFICATIONS_MENTIONED = "/notifications?type=mentioned";
public static final String SUBURL_NOTIFICATIONS_RESHARED = "/notifications?type=reshared";
public static final String SUBURL_NOTIFICATIONS_STARTED_SHARING = "/notifications?type=started_sharing";
+ public static final String SUBURL_REPORTS = "/reports";
public DiasporaUrlHelper(AppSettings settings) {
this.settings = settings;
@@ -273,6 +274,16 @@ public class DiasporaUrlHelper {
return getPodUrl() + SUBURL_MANAGE_CONTACTS;
}
+ /**
+ * Return a url that points to the report page of the pod.
+ * Note: Only admins/moderators do have access to that url.
+ *
+ * @return https://(pod-domain.tld)/reports
+ */
+ public String getReportsUrl() {
+ return getPodUrl() + SUBURL_REPORTS;
+ }
+
public String getSuburlNotificationsAlsoCommentedUrl() {
return getPodUrl() + SUBURL_NOTIFICATIONS_ALSO_COMMENTED;
}
diff --git a/app/src/main/java/com/github/dfa/diaspora_android/web/BrowserFragment.java b/app/src/main/java/com/github/dfa/diaspora_android/web/BrowserFragment.java
index 0460e428..e362fd09 100644
--- a/app/src/main/java/com/github/dfa/diaspora_android/web/BrowserFragment.java
+++ b/app/src/main/java/com/github/dfa/diaspora_android/web/BrowserFragment.java
@@ -130,6 +130,7 @@ public class BrowserFragment extends ThemedFragment {
webSettings.setAllowFileAccess(false);
webSettings.setUseWideViewPort(true);
webSettings.setLoadWithOverviewMode(true);
+ webSettings.setUserAgentString("Mozilla/5.0 (Linux; U; Android 4.4.4; Nexus 5 Build/KTU84P) AppleWebkit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30");
webSettings.setDomStorageEnabled(true);
webSettings.setMinimumFontSize(appSettings.getMinimumFontSize());
webSettings.setLoadsImagesAutomatically(appSettings.isLoadImages());
diff --git a/app/src/main/res/drawable/ic_report_black_48px.xml b/app/src/main/res/drawable/ic_report_black_48px.xml
new file mode 100644
index 00000000..7777c6b4
--- /dev/null
+++ b/app/src/main/res/drawable/ic_report_black_48px.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/main__navdrawer.xml b/app/src/main/res/menu/main__navdrawer.xml
index 7e863176..c57c38ee 100644
--- a/app/src/main/res/menu/main__navdrawer.xml
+++ b/app/src/main/res/menu/main__navdrawer.xml
@@ -53,6 +53,11 @@
android:icon="@drawable/ic_public_black_48px"
android:title="@string/nav_public_activities" />
+
+
-
+ Acerca de
+ Licencia
+ Depurando
+ Aplicación
+ Dispositivo
+ Pod de Diaspora
+ Depurar registro
+ Depurar registro (Detallado)
+ Versión aplicación:%1$s
+ Nombre del paquete: %1$s
+ Versión de Android: %1$s
+ Nombre del dispositivo: %1$s
+ Nombre clave: %1$s
+ Nombre de perfil del pod: %1$s
+ Dominio del pod:%1$s
+ Registro de depuración copiado al portapapeles
+ Usadas bibliotecas de terceros
+
+DiasporaForAndroid es su aplicación complementaria para explorar la red social Diaspora. Añade características como útiles barras de herramientas y soporte para servidores proxy como la red Tor a su experiencia social. <br><br>
+
+Diaspora utiliza Markdown para dar formato a las publicaciones. Puede encontrar más informaciónat<br>
+
+El desarrollo de DiasporaForAndroid es libre en sentido de libertad y sigue las ideas del proyecto Diaspora.<br>
+
+Puede encontrar el código fuente en Github: <br>
+https://github.com/Diaspora-for-Android/diaspora-android <br> <br>
+
+Si encuentra algún problema o tiene alguna sugerencia, puede utilizar nuestro gestor de errores en el enlace de arriba.
+También puede publicar su pregunta utilizando la etiqueta #DFAQ en Diaspora. <br> <br>
+
+¿Esta aplicación no está disponible en su idioma? Compruebe nuestro proyecto en Crowdin.com y ¡ayúdenos a traducirlo!<br>
+https://crowdin.com/project/diaspora-for-android <br> <br>
+
+¡No dude en hablarle a sus amigos de #DiasporaforAndroid!
diff --git a/app/src/main/res/values-it/strings-about.xml b/app/src/main/res/values-it/strings-about.xml
index c093915e..3d9d3390 100644
--- a/app/src/main/res/values-it/strings-about.xml
+++ b/app/src/main/res/values-it/strings-about.xml
@@ -14,6 +14,9 @@
Nome pacchetto: %1$s
Versione Android: %1$s
Nome dispositivo: %1$s
+ Codename: %1$s
+ Pod alias: %1$s
+ Dominio pod: %1$s
Log di debug copiato negli appunti
Librerie di terze parti usate
diff --git a/app/src/main/res/values-it/strings-preferences.xml b/app/src/main/res/values-it/strings-preferences.xml
index 60303579..d58afca0 100644
--- a/app/src/main/res/values-it/strings-preferences.xml
+++ b/app/src/main/res/values-it/strings-preferences.xml
@@ -28,6 +28,9 @@
Dimensione font
+ Normale
+ Grosso
+ Immenso
Carica immagini
Disabilita il caricamento delle immagini per risparmiare la rete dati
@@ -39,6 +42,8 @@
Usa il proxy con i dati di Diaspora per eludere i firewall.\nPotrebbe essere necessario il riavvio
Host
Porta
+ App è necessario riavviare per disattivare l\'utilizzo del proxy
+ Orbot proxy preset caricato
Apri collegamenti esterni con le schede personalizzate di Chrome. Chromium o Google Chrome devono essere installati per questa funzione. \nNOTA IMPORTANTE: le schede personalizzate di Chrome non usano i server proxy configurabili!
diff --git a/app/src/main/res/values-pl/strings-about.xml b/app/src/main/res/values-pl/strings-about.xml
index 78d4af3c..aa051962 100644
--- a/app/src/main/res/values-pl/strings-about.xml
+++ b/app/src/main/res/values-pl/strings-about.xml
@@ -15,7 +15,7 @@
Wersja systemu Android: %1$s
Nazwa urządzenia: %1$s
Nazwa kodowa: %1$s
- Nazwa profilu na Podzie: %1$s
+ Alias Poda: %1$s
Domena Poda: %1$s
Log debugowania został skopiowany do schowka
Lista bibliotek zewnętrznych
diff --git a/app/src/main/res/values/strings-preferences.xml b/app/src/main/res/values/strings-preferences.xml
index 16fec09c..f54846da 100644
--- a/app/src/main/res/values/strings-preferences.xml
+++ b/app/src/main/res/values/strings-preferences.xml
@@ -34,6 +34,7 @@
pref_catkey__visibility_navslider
+ General
pref_key__visibility_navslider__exit
pref_key__visibility_nav__help_license
pref_key__visibility_nav__public_activities
@@ -45,6 +46,8 @@
pref_key__visibility_nav__followed_tags
pref_key__visibility_nav__profile
pref_key__visibility_nav__contacts
+ Admin
+ pref_key__visibility_nav__report
podUserProfile_avatar
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index e6e1d37f..7854b617 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -70,6 +70,7 @@
Followed Tags
Public activities
@string/contacts
+ Report
Share link as text
Share screenshot of webpage
diff --git a/app/src/main/res/xml/preferences__sub_debugging.xml b/app/src/main/res/xml/preferences__sub_debugging.xml
index 6cafda0c..1bbea14f 100644
--- a/app/src/main/res/xml/preferences__sub_debugging.xml
+++ b/app/src/main/res/xml/preferences__sub_debugging.xml
@@ -5,7 +5,7 @@
android:title="@string/pref_title__sub_logging">
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
\ No newline at end of file