From 1843e7bd7a6afec082a838967b1479a9720e6d8d Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 3 Oct 2018 19:14:03 +0000 Subject: [PATCH 1/5] New translations strings.xml (Basque) --- app/src/main/res/values-eu/strings.xml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index 6bebe8b9f..f6957dffc 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -123,7 +123,7 @@ Mututu kontu hau? Blokeatu kontu hau? Salatu toot hau? - Block this domain? + Blokeatu domeinu hau? Kendu toot hau? @@ -563,17 +563,17 @@ Eskerrik asko Stéphane logoagatik. Hautatu doinua Gaitu denbora-tartea Laguntza bideoak - Fetching remote thread! - No blocked domains! - Unblock domain - Are you sure to unblock %s? - Are you sure to block %s? - Blocked domains - Block domain - The domain is blocked - The domain is no longer blocked! - Fetching remote status - Comment + Urruneko haria eskuratzen! + Ez dago blokeatutako domeinurik! + Desblokeatu domeinua + Ziur al zaude %s desblokeatu nahi duzula? + Ziur al zaude %s blokeatu nahi duzula? + Blokeatutako domeinuak + Blokeatu domeinua + Domeinu hau blokeatuta dago + Domeinua ez dago jada blokeatuta! + Urruneko mezua jasotzen + Iruzkina Inoiz ez 30 minutu From 3348cd5f7935d3b7c220540e80f3dc04de30b330 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 4 Oct 2018 22:41:44 +0000 Subject: [PATCH 2/5] New translations strings.xml (Serbian (Cyrillic)) --- app/src/main/res/values-sr/strings.xml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/src/main/res/values-sr/strings.xml b/app/src/main/res/values-sr/strings.xml index 92caeff08..90995cc75 100644 --- a/app/src/main/res/values-sr/strings.xml +++ b/app/src/main/res/values-sr/strings.xml @@ -123,7 +123,7 @@ Ућуткај овај налог? Блокирај овај налог? Пријави овaj тут? - Block this domain? + Блокирај овај домен? Уклони овај тут? @@ -567,17 +567,17 @@ Изаберите тон Омогући термин Видео упутства - Fetching remote thread! - No blocked domains! - Unblock domain - Are you sure to unblock %s? - Are you sure to block %s? - Blocked domains - Block domain - The domain is blocked - The domain is no longer blocked! - Fetching remote status - Comment + Дохватам удаљену преписку! + Нема блокираних домена! + Одблокирај домен + Да ли сте сигурни да желите да одблокирате %s? + Да ли сте сигурни да желите да блокирате %s? + Блокирани домени + Блокирај домен + Домен блокиран + Домен није више блокиран! + Дохватам удаљени статус + Коментар Никадa 30 минута From 02bddbe012d403e60e6c6ffb46d16104a44558d4 Mon Sep 17 00:00:00 2001 From: stom79 Date: Fri, 5 Oct 2018 18:07:48 +0200 Subject: [PATCH 3/5] Change peertube video host --- app/src/main/java/fr/gouv/etalab/mastodon/client/API.java | 2 +- .../fr/gouv/etalab/mastodon/drawers/HowToVideosAdapter.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/client/API.java b/app/src/main/java/fr/gouv/etalab/mastodon/client/API.java index e450e19ee..d6f2bb6d0 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/client/API.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/client/API.java @@ -559,7 +559,7 @@ public class API { List howToVideos = new ArrayList<>(); try { HttpsConnection httpsConnection = new HttpsConnection(context); - String response = httpsConnection.get("https://peertube.fr/api/v1/video-channels/bb32394a-a6d2-4f41-9b8e-ad9514a66009/videos", 60, null, null); + String response = httpsConnection.get("https://peertube.social/api/v1/video-channels/mastalab_channel/videos", 60, null, null); JSONArray jsonArray = new JSONObject(response).getJSONArray("data"); howToVideos = parseHowTos(jsonArray); } catch (HttpsConnection.HttpsConnectionException e) { diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/HowToVideosAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/HowToVideosAdapter.java index e5ce1df64..7d7f80f51 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/HowToVideosAdapter.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/HowToVideosAdapter.java @@ -118,14 +118,14 @@ public class HowToVideosAdapter extends BaseAdapter implements OnListActionInter next.setBounds(0,0,(int) (30 * scale + 0.5f),(int) (30 * scale + 0.5f)); holder.how_to_description.setCompoundDrawables(null, null, next, null); Glide.with(holder.how_to_image.getContext()) - .load("https://peertube.fr" + howToVideo.getThumbnailPath()) + .load("https://peertube.social" + howToVideo.getThumbnailPath()) .into(holder.how_to_image); holder.how_to_container.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(context, WebviewActivity.class); Bundle b = new Bundle(); - String finalUrl = "https://peertube.fr" + howToVideo.getEmbedPath(); + String finalUrl = "https://peertube.social" + howToVideo.getEmbedPath(); b.putString("url", finalUrl); b.putBoolean("peertubeLink", true); Pattern link = Pattern.compile("(https?:\\/\\/[\\da-z\\.-]+\\.[a-z\\.]{2,10})\\/videos\\/embed\\/(\\w{8}-\\w{4}-\\w{4}-\\w{4}-\\w{12})$"); From 12daa76dbd6589093d8ea18d128c9b1435531e9f Mon Sep 17 00:00:00 2001 From: stom79 Date: Fri, 5 Oct 2018 18:09:01 +0200 Subject: [PATCH 4/5] Release 1.14.3 --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f99e50c87..d0167e2b8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "fr.gouv.etalab.mastodon" minSdkVersion 15 targetSdkVersion 28 - versionCode 147 - versionName "1.14.2" + versionCode 148 + versionName "1.14.3" } flavorDimensions "default" buildTypes { From d980f2e0bc0547b9c231348919dad044de9037fd Mon Sep 17 00:00:00 2001 From: stom79 Date: Sat, 6 Oct 2018 15:37:44 +0200 Subject: [PATCH 5/5] Some fixes --- .../etalab/mastodon/activities/TootActivity.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java index 8cbbdef53..7373bf801 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java @@ -17,9 +17,7 @@ package fr.gouv.etalab.mastodon.activities; import android.Manifest; import android.annotation.SuppressLint; import android.app.Activity; -import android.content.BroadcastReceiver; import android.content.ContentResolver; -import android.content.IntentFilter; import android.content.pm.PackageManager; import android.graphics.BitmapFactory; import android.os.Environment; @@ -195,6 +193,7 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount private boolean removed; private boolean restoredScheduled; static boolean active = false; + private static Activity activity; @Override protected void onCreate(Bundle savedInstanceState) { @@ -218,7 +217,7 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount } setContentView(R.layout.activity_toot); - + activity = this; ActionBar actionBar = getSupportActionBar(); if( actionBar != null ){ LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); @@ -796,7 +795,11 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount if( uriFile == null) { - Toast.makeText(activityWeakReference.get(), R.string.toast_error, Toast.LENGTH_SHORT).show(); + activity.runOnUiThread(new Runnable() { + public void run() { + Toast.makeText(activityWeakReference.get(), R.string.toast_error, Toast.LENGTH_SHORT).show(); + } + }); return null; } bs = Helper.compressImage(activityWeakReference.get(), uriFile, Helper.MediaType.MEDIA); @@ -1589,7 +1592,7 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount @Override public void onPostStatusAction(APIResponse apiResponse) { - if( apiResponse.getError() != null){ + if( apiResponse.getError() != null ){ toot_it.setEnabled(true); if( apiResponse.getError().getError().contains("422")){ showAToast(getString(R.string.toast_error_char_limit)); @@ -1614,7 +1617,7 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount if( toot_cw_content.getText().toString().trim().length() > 0) toot.setSpoiler_text(toot_cw_content.getText().toString().trim()); toot.setVisibility(visibility); - if( apiResponse.getStatuses() != null) + if( apiResponse.getStatuses() != null && apiResponse.getStatuses().size() > 0) toot.setIn_reply_to_id(apiResponse.getStatuses().get(0).getId()); toot.setContent(tootContent); new PostStatusAsyncTask(getApplicationContext(), accountReply, toot, TootActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);