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"
// Android Support
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:support-vector-drawable:27.1.0'
implementation 'com.android.support:customtabs:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:support-vector-drawable:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
// Firebase + crashlytics
implementation 'com.google.firebase:firebase-core:12.0.0'
implementation 'com.google.firebase:firebase-config:12.0.0'
implementation 'com.google.firebase:firebase-invites:12.0.0'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.0@aar') {
implementation 'com.google.firebase:firebase-core:12.0.1'
implementation 'com.google.firebase:firebase-config:12.0.1'
implementation 'com.google.firebase:firebase-invites:12.0.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
transitive = true
}
@ -181,7 +181,7 @@ dependencies {
// Pager
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);
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 Preference identifier = findPreference("debug_identifier");
@ -259,11 +259,14 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
identifier.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
ClipData clip = ClipData.newPlainText("Selfoss unique id", id);
clipboard.setPrimaryClip(clip);
if (clipboard != null) {
ClipData clip = ClipData.newPlainText("Selfoss unique id", id);
clipboard.setPrimaryClip(clip);
Toast.makeText(getActivity(), R.string.unique_id_to_clipboard, Toast.LENGTH_LONG).show();
return true;
Toast.makeText(getActivity(), R.string.unique_id_to_clipboard, Toast.LENGTH_LONG).show();
return true;
}
return false;
}
});
identifier.setTitle(id);

View File

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

View File

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

View File

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

View File

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

View File

@ -94,9 +94,6 @@
android:id="@+id/fab"
android:layout_width="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_marginBottom="16dp"
android:layout_marginEnd="16dp"

View File

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

View File

@ -38,9 +38,9 @@ project.ext.preDexLibs = !project.hasProperty('disablePreDex')
subprojects {
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
} 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
}
}