From bc925e1a1e2e66f7575d52b956d657c642ecb7b4 Mon Sep 17 00:00:00 2001 From: Gregor Santner Date: Fri, 4 Nov 2016 03:08:59 +0100 Subject: [PATCH] Release v0.2.0 --- CONTRIBUTORS.txt | 5 +- README.md | 3 - app/build.gradle | 57 ++++++++++--------- app/src/main/AndroidManifest.xml | 43 -------------- .../activity/MainActivity.java | 7 +-- .../activity/SettingsActivity.java | 4 +- .../DiasporaUserProfileChangedListener.java | 12 ++-- .../diaspora_android/util/AppSettings.java | 4 +- .../util/DiasporaUrlHelper.java | 2 +- .../diaspora_android/web/BrowserFragment.java | 1 + app/src/main/res/values-es/strings-about.xml | 34 +++++++++++ app/src/main/res/values-it/strings-about.xml | 3 + .../res/values-it/strings-preferences.xml | 5 ++ .../res/xml/preferences__sub_debugging.xml | 2 +- 14 files changed, 94 insertions(+), 88 deletions(-) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 965a4288..63761195 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -11,6 +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 -Paweł Szymon Kosiński (pskosinski): Polish translation +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 190e5920..540eda92 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 9 + versionName "0.2.0" 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,29 +85,25 @@ task copyRepoFiles(type: Copy) { } } - // Download Podlist - final String PODLIST_PATH = "app/src/main/res/raw/podlist.json" - final String PODLIST_URL = 'https://raw.githubusercontent.com/Diaspora-for-Android/diaspora-android-extras/master/podList/podlist.json' + // Download PodList downloadFile(PODLIST_PATH, PODLIST_URL, false) - // Do if we build in release (signed apk) mode - android.applicationVariants.all { v -> - if (v.buildType.name == "release"){ - v.assemble.doFirst { - downloadFile(PODLIST_PATH, PODLIST_URL, true) - } + // 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) } } } -def downloadFile(filePath, url, downloadIfExists ) { +// Downloads a file +def downloadFile(filePath, url, downloadIfExists) { def f = new File(filePath) - if (f.exists() && downloadIfExists){ - f.delete(); - } + f.exists() && downloadIfExists && f.delete(); if (!f.exists()) { - new URL(url).withInputStream{ i -> f.withOutputStream{ it << i }} + new URL(url).withInputStream { i -> f.withOutputStream { it << i } } } } -tasks.copyRepoFiles.execute() \ No newline at end of file +tasks.copyRepoFiles.execute() 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..f5153fd7 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; @@ -462,7 +461,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 +485,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 +580,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(); 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..bb7ffac4 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() { 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..7eea373a 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 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/values-es/strings-about.xml b/app/src/main/res/values-es/strings-about.xml index 54191dc5..c8b437e0 100644 --- a/app/src/main/res/values-es/strings-about.xml +++ b/app/src/main/res/values-es/strings-about.xml @@ -2,6 +2,40 @@ + 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/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">