Merge branch 'develop' into follow_peertube

# Conflicts:
#	app/src/main/java/fr/gouv/etalab/mastodon/client/API.java
This commit is contained in:
stom79 2018-10-06 15:38:22 +02:00
commit d3b7de5a63
4 changed files with 35 additions and 32 deletions

View File

@ -7,8 +7,8 @@ android {
applicationId "fr.gouv.etalab.mastodon" applicationId "fr.gouv.etalab.mastodon"
minSdkVersion 15 minSdkVersion 15
targetSdkVersion 28 targetSdkVersion 28
versionCode 147 versionCode 148
versionName "1.14.2" versionName "1.14.3"
} }
flavorDimensions "default" flavorDimensions "default"
buildTypes { buildTypes {

View File

@ -17,9 +17,7 @@ package fr.gouv.etalab.mastodon.activities;
import android.Manifest; import android.Manifest;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.app.Activity; import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.ContentResolver; import android.content.ContentResolver;
import android.content.IntentFilter;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.os.Environment; import android.os.Environment;
@ -195,6 +193,7 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount
private boolean removed; private boolean removed;
private boolean restoredScheduled; private boolean restoredScheduled;
static boolean active = false; static boolean active = false;
private static Activity activity;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
@ -218,7 +217,7 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount
} }
setContentView(R.layout.activity_toot); setContentView(R.layout.activity_toot);
activity = this;
ActionBar actionBar = getSupportActionBar(); ActionBar actionBar = getSupportActionBar();
if( actionBar != null ){ if( actionBar != null ){
LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE); LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
@ -796,7 +795,11 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount
if( uriFile == null) { 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; return null;
} }
bs = Helper.compressImage(activityWeakReference.get(), uriFile, Helper.MediaType.MEDIA); bs = Helper.compressImage(activityWeakReference.get(), uriFile, Helper.MediaType.MEDIA);
@ -1589,7 +1592,7 @@ public class TootActivity extends BaseActivity implements OnRetrieveSearcAccount
@Override @Override
public void onPostStatusAction(APIResponse apiResponse) { public void onPostStatusAction(APIResponse apiResponse) {
if( apiResponse.getError() != null){ if( apiResponse.getError() != null ){
toot_it.setEnabled(true); toot_it.setEnabled(true);
if( apiResponse.getError().getError().contains("422")){ if( apiResponse.getError().getError().contains("422")){
showAToast(getString(R.string.toast_error_char_limit)); 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) if( toot_cw_content.getText().toString().trim().length() > 0)
toot.setSpoiler_text(toot_cw_content.getText().toString().trim()); toot.setSpoiler_text(toot_cw_content.getText().toString().trim());
toot.setVisibility(visibility); 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.setIn_reply_to_id(apiResponse.getStatuses().get(0).getId());
toot.setContent(tootContent); toot.setContent(tootContent);
new PostStatusAsyncTask(getApplicationContext(), accountReply, toot, TootActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); new PostStatusAsyncTask(getApplicationContext(), accountReply, toot, TootActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);

View File

@ -123,7 +123,7 @@
<item>Mututu kontu hau?</item> <item>Mututu kontu hau?</item>
<item>Blokeatu kontu hau?</item> <item>Blokeatu kontu hau?</item>
<item>Salatu toot hau?</item> <item>Salatu toot hau?</item>
<item>Block this domain?</item> <item>Blokeatu domeinu hau?</item>
</string-array> </string-array>
<string-array name="more_action_owner_confirm"> <string-array name="more_action_owner_confirm">
<item>Kendu toot hau?</item> <item>Kendu toot hau?</item>
@ -563,17 +563,17 @@ Eskerrik asko Stéphane logoagatik. </string>
<string name="select_sound">Hautatu doinua</string> <string name="select_sound">Hautatu doinua</string>
<string name="set_enable_time_slot">Gaitu denbora-tartea</string> <string name="set_enable_time_slot">Gaitu denbora-tartea</string>
<string name="how_to_videos">Laguntza bideoak</string> <string name="how_to_videos">Laguntza bideoak</string>
<string name="retrieve_remote_conversation">Fetching remote thread!</string> <string name="retrieve_remote_conversation">Urruneko haria eskuratzen!</string>
<string name="no_blocked_domain">No blocked domains!</string> <string name="no_blocked_domain">Ez dago blokeatutako domeinurik!</string>
<string name="unblock_domain_confirm">Unblock domain</string> <string name="unblock_domain_confirm">Desblokeatu domeinua</string>
<string name="unblock_domain_confirm_message">Are you sure to unblock %s?</string> <string name="unblock_domain_confirm_message">Ziur al zaude %s desblokeatu nahi duzula?</string>
<string name="block_domain_confirm_message">Are you sure to block %s?</string> <string name="block_domain_confirm_message">Ziur al zaude %s blokeatu nahi duzula?</string>
<string name="blocked_domains">Blocked domains</string> <string name="blocked_domains">Blokeatutako domeinuak</string>
<string name="block_domain">Block domain</string> <string name="block_domain">Blokeatu domeinua</string>
<string name="toast_block_domain">The domain is blocked</string> <string name="toast_block_domain">Domeinu hau blokeatuta dago</string>
<string name="toast_unblock_domain">The domain is no longer blocked!</string> <string name="toast_unblock_domain">Domeinua ez dago jada blokeatuta!</string>
<string name="retrieve_remote_status">Fetching remote status</string> <string name="retrieve_remote_status">Urruneko mezua jasotzen</string>
<string name="comment">Comment</string> <string name="comment">Iruzkina</string>
<string-array name="filter_expire"> <string-array name="filter_expire">
<item>Inoiz ez</item> <item>Inoiz ez</item>
<item>30 minutu</item> <item>30 minutu</item>

View File

@ -123,7 +123,7 @@
<item>Ућуткај овај налог?</item> <item>Ућуткај овај налог?</item>
<item>Блокирај овај налог?</item> <item>Блокирај овај налог?</item>
<item>Пријави овaj тут?</item> <item>Пријави овaj тут?</item>
<item>Block this domain?</item> <item>Блокирај овај домен?</item>
</string-array> </string-array>
<string-array name="more_action_owner_confirm"> <string-array name="more_action_owner_confirm">
<item>Уклони овај тут?</item> <item>Уклони овај тут?</item>
@ -567,17 +567,17 @@
<string name="select_sound">Изаберите тон</string> <string name="select_sound">Изаберите тон</string>
<string name="set_enable_time_slot">Омогући термин</string> <string name="set_enable_time_slot">Омогући термин</string>
<string name="how_to_videos">Видео упутства</string> <string name="how_to_videos">Видео упутства</string>
<string name="retrieve_remote_conversation">Fetching remote thread!</string> <string name="retrieve_remote_conversation">Дохватам удаљену преписку!</string>
<string name="no_blocked_domain">No blocked domains!</string> <string name="no_blocked_domain">Нема блокираних домена!</string>
<string name="unblock_domain_confirm">Unblock domain</string> <string name="unblock_domain_confirm">Одблокирај домен</string>
<string name="unblock_domain_confirm_message">Are you sure to unblock %s?</string> <string name="unblock_domain_confirm_message">Да ли сте сигурни да желите да одблокирате %s?</string>
<string name="block_domain_confirm_message">Are you sure to block %s?</string> <string name="block_domain_confirm_message">Да ли сте сигурни да желите да блокирате %s?</string>
<string name="blocked_domains">Blocked domains</string> <string name="blocked_domains">Блокирани домени</string>
<string name="block_domain">Block domain</string> <string name="block_domain">Блокирај домен</string>
<string name="toast_block_domain">The domain is blocked</string> <string name="toast_block_domain">Домен блокиран</string>
<string name="toast_unblock_domain">The domain is no longer blocked!</string> <string name="toast_unblock_domain">Домен није више блокиран!</string>
<string name="retrieve_remote_status">Fetching remote status</string> <string name="retrieve_remote_status">Дохватам удаљени статус</string>
<string name="comment">Comment</string> <string name="comment">Коментар</string>
<string-array name="filter_expire"> <string-array name="filter_expire">
<item>Никадa</item> <item>Никадa</item>
<item>30 минута</item> <item>30 минута</item>