add new debug build so two tusky versions can be run on the same device
|
@ -20,6 +20,9 @@ android {
|
|||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
applicationIdSuffix ".test"
|
||||
}
|
||||
}
|
||||
|
||||
flavorDimensions "store"
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
|
||||
<size android:width="108dp" android:height="108dp" />
|
||||
<gradient
|
||||
android:type="radial"
|
||||
android:centerX="50%"
|
||||
android:centerY="50%"
|
||||
android:startColor="#25d069"
|
||||
android:endColor="#19a341"
|
||||
android:gradientRadius="100"/>
|
||||
</shape>
|
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 20 KiB |
|
@ -40,7 +40,7 @@
|
|||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<data
|
||||
android:host="@string/oauth_redirect_host"
|
||||
android:host="${applicationId}"
|
||||
android:scheme="@string/oauth_scheme" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
@ -111,7 +111,7 @@
|
|||
|
||||
<provider
|
||||
android:name="android.support.v4.content.FileProvider"
|
||||
android:authorities="com.keylesspalace.tusky.fileprovider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
|
|
|
@ -145,7 +145,7 @@ public class LoginActivity extends AppCompatActivity {
|
|||
|
||||
private String getOauthRedirectUri() {
|
||||
String scheme = getString(R.string.oauth_scheme);
|
||||
String host = getString(R.string.oauth_redirect_host);
|
||||
String host = BuildConfig.APPLICATION_ID;
|
||||
return scheme + "://" + host + "/";
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ package com.keylesspalace.tusky;
|
|||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
|
@ -371,6 +372,16 @@ public class MainActivity extends BaseActivity implements ActionButtonActivity {
|
|||
return false;
|
||||
})
|
||||
.build();
|
||||
|
||||
if(BuildConfig.DEBUG) {
|
||||
IDrawerItem debugItem = new SecondaryDrawerItem()
|
||||
.withIdentifier(1337)
|
||||
.withName("debug")
|
||||
.withDisabledTextColor(Color.GREEN)
|
||||
.withSelectable(false)
|
||||
.withEnabled(false);
|
||||
drawer.addItem(debugItem);
|
||||
}
|
||||
}
|
||||
|
||||
private void logout() {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<string name="app_website" translatable="false">https://tusky.keylesspalace.com</string>
|
||||
|
||||
<string name="oauth_scheme" translatable="false">oauth2redirect</string>
|
||||
<string name="oauth_redirect_host" translatable="false">com.keylesspalace.tusky</string>
|
||||
<string name="preferences_file_key" translatable="false">com.keylesspalace.tusky.PREFERENCES</string>
|
||||
|
||||
<string name="status_sensitive_media_template" translatable="false"><b>%1$s</b><br>%2$s</string>
|
||||
|
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |