Prepares release 1.4.0
This commit is contained in:
parent
c8809769dd
commit
2b36a78324
|
@ -5,10 +5,10 @@ android {
|
||||||
buildToolsVersion "25.0.3"
|
buildToolsVersion "25.0.3"
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "fr.gouv.etalab.mastodon"
|
applicationId "fr.gouv.etalab.mastodon"
|
||||||
minSdkVersion 16
|
minSdkVersion 15
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 39
|
versionCode 40
|
||||||
versionName "1.3.9.1"
|
versionName "1.4.0"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -19,6 +19,7 @@ import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
|
@ -27,6 +28,7 @@ import android.support.design.widget.TabLayout;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.support.v4.content.LocalBroadcastManager;
|
import android.support.v4.content.LocalBroadcastManager;
|
||||||
import android.support.v4.view.PagerAdapter;
|
import android.support.v4.view.PagerAdapter;
|
||||||
import android.support.v4.view.ViewPager;
|
import android.support.v4.view.ViewPager;
|
||||||
|
@ -73,6 +75,8 @@ import fr.gouv.etalab.mastodon.interfaces.OnRetrieveRelationshipInterface;
|
||||||
import mastodon.etalab.gouv.fr.mastodon.R;
|
import mastodon.etalab.gouv.fr.mastodon.R;
|
||||||
import fr.gouv.etalab.mastodon.client.Entities.Relationship;
|
import fr.gouv.etalab.mastodon.client.Entities.Relationship;
|
||||||
|
|
||||||
|
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Thomas on 01/05/2017.
|
* Created by Thomas on 01/05/2017.
|
||||||
|
@ -300,6 +304,22 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi
|
||||||
ImageView account_pp = (ImageView) findViewById(R.id.account_pp);
|
ImageView account_pp = (ImageView) findViewById(R.id.account_pp);
|
||||||
TextView account_dn = (TextView) findViewById(R.id.account_dn);
|
TextView account_dn = (TextView) findViewById(R.id.account_dn);
|
||||||
TextView account_un = (TextView) findViewById(R.id.account_un);
|
TextView account_un = (TextView) findViewById(R.id.account_un);
|
||||||
|
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
|
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
||||||
|
if( theme == Helper.THEME_DARK){
|
||||||
|
changeDrawableColor(getApplicationContext(), R.drawable.ic_action_lock_closed,R.color.dark_text);
|
||||||
|
}else {
|
||||||
|
changeDrawableColor(getApplicationContext(), R.drawable.ic_action_lock_closed,R.color.black);
|
||||||
|
}
|
||||||
|
//Redraws icon for locked accounts
|
||||||
|
final float scale = getResources().getDisplayMetrics().density;
|
||||||
|
if( account != null && account.isLocked()){
|
||||||
|
Drawable img = ContextCompat.getDrawable(getApplicationContext(), R.drawable.ic_action_lock_closed);
|
||||||
|
img.setBounds(0,0,(int) (20 * scale + 0.5f),(int) (20 * scale + 0.5f));
|
||||||
|
account_dn.setCompoundDrawables( img, null, null, null);
|
||||||
|
}else{
|
||||||
|
account_dn.setCompoundDrawables( null, null, null, null);
|
||||||
|
}
|
||||||
|
|
||||||
ActionBar actionBar = getSupportActionBar();
|
ActionBar actionBar = getSupportActionBar();
|
||||||
LayoutInflater mInflater = LayoutInflater.from(ShowAccountActivity.this);
|
LayoutInflater mInflater = LayoutInflater.from(ShowAccountActivity.this);
|
||||||
|
|
|
@ -1025,7 +1025,11 @@ public class Helper {
|
||||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
boolean embedded_browser = sharedpreferences.getBoolean(Helper.SET_EMBEDDED_BROWSER, true);
|
boolean embedded_browser = sharedpreferences.getBoolean(Helper.SET_EMBEDDED_BROWSER, true);
|
||||||
if( embedded_browser){
|
if( embedded_browser){
|
||||||
Matcher matcher = Patterns.WEB_URL.matcher(spannableString);
|
Matcher matcher;
|
||||||
|
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT)
|
||||||
|
matcher = Patterns.WEB_URL.matcher(spannableString);
|
||||||
|
else
|
||||||
|
matcher = urlPattern.matcher(spannableString);
|
||||||
while (matcher.find()){
|
while (matcher.find()){
|
||||||
int matchStart = matcher.start(1);
|
int matchStart = matcher.start(1);
|
||||||
int matchEnd = matcher.end();
|
int matchEnd = matcher.end();
|
||||||
|
@ -1127,7 +1131,11 @@ public class Helper {
|
||||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
boolean embedded_browser = sharedpreferences.getBoolean(Helper.SET_EMBEDDED_BROWSER, true);
|
boolean embedded_browser = sharedpreferences.getBoolean(Helper.SET_EMBEDDED_BROWSER, true);
|
||||||
if( embedded_browser){
|
if( embedded_browser){
|
||||||
Matcher matcher = Patterns.WEB_URL.matcher(spannableString);
|
Matcher matcher;
|
||||||
|
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT)
|
||||||
|
matcher = Patterns.WEB_URL.matcher(spannableString);
|
||||||
|
else
|
||||||
|
matcher = urlPattern.matcher(spannableString);
|
||||||
while (matcher.find()){
|
while (matcher.find()){
|
||||||
int matchStart = matcher.start(1);
|
int matchStart = matcher.start(1);
|
||||||
int matchEnd = matcher.end();
|
int matchEnd = matcher.end();
|
||||||
|
|
Loading…
Reference in New Issue