Cleaning.

This commit is contained in:
Amine Bou 2018-04-07 17:19:41 +02:00
parent c397de8c3e
commit 67a30b92f6
9 changed files with 29 additions and 27 deletions

View File

@ -120,20 +120,20 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// Android Support // Android Support
implementation 'com.android.support:appcompat-v7:27.1.0' implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.0' implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.0' implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.0' implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:support-vector-drawable:27.1.0' implementation 'com.android.support:support-vector-drawable:27.1.1'
implementation 'com.android.support:customtabs:27.1.0' implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.0' implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support.constraint:constraint-layout:1.0.2'
// Firebase + crashlytics // Firebase + crashlytics
implementation 'com.google.firebase:firebase-core:12.0.0' implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-config:12.0.0' implementation 'com.google.firebase:firebase-config:12.0.1'
implementation 'com.google.firebase:firebase-invites:12.0.0' implementation 'com.google.firebase:firebase-invites:12.0.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.0@aar') { implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
transitive = true transitive = true
} }
@ -181,7 +181,7 @@ dependencies {
// Pager // Pager
implementation 'me.relex:circleindicator:1.2.2@aar' implementation 'me.relex:circleindicator:1.2.2@aar'
implementation 'androidx.core:core-ktx:0.2' implementation 'androidx.core:core-ktx:0.3'
} }

View File

@ -249,7 +249,7 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
addPreferencesFromResource(R.xml.pref_debug); addPreferencesFromResource(R.xml.pref_debug);
setHasOptionsMenu(true); setHasOptionsMenu(true);
SharedPreferences pref = getActivity().getSharedPreferences(Config.Companion.getSettingsName(), Context.MODE_PRIVATE); SharedPreferences pref = getActivity().getSharedPreferences(Config.settingsName, Context.MODE_PRIVATE);
final String id = pref.getString("unique_id", "..."); final String id = pref.getString("unique_id", "...");
final Preference identifier = findPreference("debug_identifier"); final Preference identifier = findPreference("debug_identifier");
@ -259,11 +259,14 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
identifier.setOnPreferenceClickListener(new OnPreferenceClickListener() { identifier.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override @Override
public boolean onPreferenceClick(Preference preference) { public boolean onPreferenceClick(Preference preference) {
ClipData clip = ClipData.newPlainText("Selfoss unique id", id); if (clipboard != null) {
clipboard.setPrimaryClip(clip); ClipData clip = ClipData.newPlainText("Selfoss unique id", id);
clipboard.setPrimaryClip(clip);
Toast.makeText(getActivity(), R.string.unique_id_to_clipboard, Toast.LENGTH_LONG).show(); Toast.makeText(getActivity(), R.string.unique_id_to_clipboard, Toast.LENGTH_LONG).show();
return true; return true;
}
return false;
} }
}); });
identifier.setTitle(id); identifier.setTitle(id);

View File

@ -26,7 +26,7 @@ class Config(c: Context) {
get() = settings.getString("httpPassword", "") get() = settings.getString("httpPassword", "")
companion object { companion object {
val settingsName = "paramsselfoss" const val settingsName = "paramsselfoss"
fun logoutAndRedirect( fun logoutAndRedirect(
c: Context, c: Context,

View File

@ -7,7 +7,7 @@ import javax.net.ssl.SSLContext
import javax.net.ssl.TrustManager import javax.net.ssl.TrustManager
import javax.net.ssl.X509TrustManager import javax.net.ssl.X509TrustManager
fun getUnsafeHttpClient() = fun getUnsafeHttpClient(): OkHttpClient.Builder =
try { try {
// Create a trust manager that does not validate certificate chains // Create a trust manager that does not validate certificate chains
val trustAllCerts = arrayOf<TrustManager>(object : X509TrustManager { val trustAllCerts = arrayOf<TrustManager>(object : X509TrustManager {

View File

@ -11,6 +11,7 @@ class ScrollAwareFABBehavior(
attrs: AttributeSet attrs: AttributeSet
) : CoordinatorLayout.Behavior<FloatingActionButton>() { ) : CoordinatorLayout.Behavior<FloatingActionButton>() {
override fun onStartNestedScroll( override fun onStartNestedScroll(
coordinatorLayout: CoordinatorLayout, coordinatorLayout: CoordinatorLayout,
child: FloatingActionButton, child: FloatingActionButton,

View File

@ -115,6 +115,7 @@
android:visibility="gone"> android:visibility="gone">
<EditText <EditText
android:inputType="text"
android:id="@+id/httpLoginView" android:id="@+id/httpLoginView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@ -94,9 +94,6 @@
android:id="@+id/fab" android:id="@+id/fab"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_gravity="end|bottom|right" android:layout_gravity="end|bottom|right"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"

View File

@ -7,11 +7,11 @@
android:icon="@drawable/heart_on" android:icon="@drawable/heart_on"
android:title="@string/remove_to_favs_reader" android:title="@string/remove_to_favs_reader"
android:visible="true" android:visible="true"
app:showAsAction="always" /> app:showAsAction="ifRoom" />
<item <item
android:id="@+id/save" android:id="@+id/save"
android:icon="@drawable/heart_off" android:icon="@drawable/heart_off"
android:title="add_to_favs_reader" android:title="@string/add_to_favs_reader"
android:visible="true" android:visible="true"
app:showAsAction="always" /> app:showAsAction="ifRoom" />
</menu> </menu>

View File

@ -38,9 +38,9 @@ project.ext.preDexLibs = !project.hasProperty('disablePreDex')
subprojects { subprojects {
project.plugins.whenPluginAdded { plugin -> project.plugins.whenPluginAdded { plugin ->
if ("com.android.build.gradle.AppPlugin".equals(plugin.class.name)) { if ("com.android.build.gradle.AppPlugin" == plugin.class.name) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
} else if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) { } else if ("com.android.build.gradle.LibraryPlugin" == plugin.class.name) {
project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs project.android.dexOptions.preDexLibraries = rootProject.ext.preDexLibs
} }
} }