Removed Firebase Crash deps, updated retrofit (with fixes) and disabled minification.
This commit is contained in:
parent
35ef798279
commit
ddf790bfe1
@ -38,7 +38,7 @@ android {
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'),
|
||||
'proguard-rules.pro'
|
||||
}
|
||||
@ -73,7 +73,6 @@ dependencies {
|
||||
compile 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
|
||||
// Firebase + crashlytics
|
||||
compile 'com.google.android.gms:play-services:10.2.6'
|
||||
compile 'com.google.firebase:firebase-core:10.2.6'
|
||||
compile 'com.google.firebase:firebase-config:10.2.6'
|
||||
compile 'com.google.firebase:firebase-invites:10.2.6'
|
||||
@ -93,9 +92,9 @@ dependencies {
|
||||
}
|
||||
|
||||
// Retrofit + http logging + okhttp
|
||||
compile 'com.squareup.retrofit2:retrofit:2.1.0'
|
||||
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
|
||||
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
|
||||
compile 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||
compile 'com.squareup.okhttp3:logging-interceptor:3.8.0'
|
||||
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
|
||||
compile 'com.burgstaller:okhttp-digest:1.12'
|
||||
|
||||
// Material-ish things
|
||||
|
3
app/proguard-rules.pro
vendored
3
app/proguard-rules.pro
vendored
@ -50,6 +50,9 @@
|
||||
-dontwarn retrofit2.Platform$Java8
|
||||
-keepattributes Signature
|
||||
-keepattributes Exceptions
|
||||
-dontwarn okio.**
|
||||
-dontwarn javax.annotation.Nullable
|
||||
-dontwarn javax.annotation.ParametersAreNonnullByDefault
|
||||
|
||||
|
||||
#Bottom bar lib
|
||||
|
@ -68,7 +68,7 @@ class AddSourceActivity : AppCompatActivity() {
|
||||
api.spouts().enqueue(object : Callback<Map<String, Spout>> {
|
||||
override fun onResponse(call: Call<Map<String, Spout>>, response: Response<Map<String, Spout>>) {
|
||||
if (response.body() != null) {
|
||||
items = response.body()
|
||||
items = response.body()!!
|
||||
|
||||
val itemsStrings = items.map { it.value.name }
|
||||
for ((key, value) in items) {
|
||||
@ -106,7 +106,7 @@ class AddSourceActivity : AppCompatActivity() {
|
||||
} else {
|
||||
api.createSource(title, url, mSpoutsValue!!, mTags.text.toString(), "").enqueue(object : Callback<SuccessResponse> {
|
||||
override fun onResponse(call: Call<SuccessResponse>, response: Response<SuccessResponse>) {
|
||||
if (response.body() != null && response.body().isSuccess) {
|
||||
if (response.body() != null && response.body()!!.isSuccess) {
|
||||
finish()
|
||||
} else {
|
||||
Toast.makeText(this@AddSourceActivity, R.string.cant_create_source, Toast.LENGTH_SHORT).show()
|
||||
|
@ -14,7 +14,6 @@ import android.support.v7.widget.GridLayoutManager
|
||||
import android.support.v7.widget.RecyclerView
|
||||
import android.support.v7.widget.StaggeredGridLayoutManager
|
||||
import android.support.v7.widget.helper.ItemTouchHelper
|
||||
import android.util.Log
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.widget.Toast
|
||||
@ -36,7 +35,6 @@ import com.github.stkent.amplify.tracking.Amplify
|
||||
import com.google.android.gms.appinvite.AppInviteInvitation
|
||||
import com.google.android.gms.common.ConnectionResult
|
||||
import com.google.android.gms.common.GoogleApiAvailability
|
||||
import com.google.firebase.crash.FirebaseCrash
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig
|
||||
import com.mikepenz.aboutlibraries.Libs
|
||||
import com.mikepenz.aboutlibraries.LibsBuilder
|
||||
@ -188,8 +186,6 @@ class HomeActivity : AppCompatActivity() {
|
||||
tabNew!!.setBadgeCount(items.size - 1)
|
||||
|
||||
} catch (e: IndexOutOfBoundsException) {
|
||||
FirebaseCrash.logcat(Log.ERROR, "SWIPE ERROR", "Swipe index out of bound")
|
||||
FirebaseCrash.report(e)
|
||||
}
|
||||
|
||||
}
|
||||
@ -247,7 +243,7 @@ class HomeActivity : AppCompatActivity() {
|
||||
elementsShown = UNREAD_SHOWN
|
||||
api!!.unreadItems.enqueue(object : Callback<List<Item>> {
|
||||
override fun onResponse(call: Call<List<Item>>, response: Response<List<Item>>) {
|
||||
if (response.body() != null && response.body().isNotEmpty()) {
|
||||
if (response.body() != null && response.body()!!.isNotEmpty()) {
|
||||
items = response.body() as ArrayList<Item>
|
||||
} else {
|
||||
items = ArrayList()
|
||||
@ -267,7 +263,7 @@ class HomeActivity : AppCompatActivity() {
|
||||
elementsShown = READ_SHOWN
|
||||
api!!.readItems.enqueue(object : Callback<List<Item>> {
|
||||
override fun onResponse(call: Call<List<Item>>, response: Response<List<Item>>) {
|
||||
if (response.body() != null && response.body().isNotEmpty()) {
|
||||
if (response.body() != null && response.body()!!.isNotEmpty()) {
|
||||
items = response.body() as ArrayList<Item>
|
||||
} else {
|
||||
items = ArrayList()
|
||||
@ -287,7 +283,7 @@ class HomeActivity : AppCompatActivity() {
|
||||
elementsShown = FAV_SHOWN
|
||||
api!!.starredItems.enqueue(object : Callback<List<Item>> {
|
||||
override fun onResponse(call: Call<List<Item>>, response: Response<List<Item>>) {
|
||||
if (response.body() != null && response.body().isNotEmpty()) {
|
||||
if (response.body() != null && response.body()!!.isNotEmpty()) {
|
||||
items = response.body() as ArrayList<Item>
|
||||
} else {
|
||||
items = ArrayList()
|
||||
@ -360,7 +356,7 @@ class HomeActivity : AppCompatActivity() {
|
||||
|
||||
api!!.readAll(ids).enqueue(object : Callback<SuccessResponse> {
|
||||
override fun onResponse(call: Call<SuccessResponse>, response: Response<SuccessResponse>) {
|
||||
if (response.body() != null && response.body().isSuccess) {
|
||||
if (response.body() != null && response.body()!!.isSuccess) {
|
||||
Toast.makeText(this@HomeActivity, R.string.all_posts_read, Toast.LENGTH_SHORT).show()
|
||||
} else {
|
||||
Toast.makeText(this@HomeActivity, R.string.all_posts_not_read, Toast.LENGTH_SHORT).show()
|
||||
@ -432,10 +428,10 @@ class HomeActivity : AppCompatActivity() {
|
||||
api!!.stats.enqueue(object : Callback<Stats> {
|
||||
override fun onResponse(call: Call<Stats>, response: Response<Stats>) {
|
||||
if (response.body() != null) {
|
||||
tabNew!!.setBadgeCount(response.body().unread)
|
||||
tabNew!!.setBadgeCount(response.body()!!.unread)
|
||||
if (displayAllCount) {
|
||||
tabArchive!!.setBadgeCount(response.body().total)
|
||||
tabStarred!!.setBadgeCount(response.body().starred)
|
||||
tabArchive!!.setBadgeCount(response.body()!!.total)
|
||||
tabStarred!!.setBadgeCount(response.body()!!.starred)
|
||||
} else {
|
||||
tabArchive!!.removeBadge()
|
||||
tabStarred!!.removeBadge()
|
||||
|
@ -203,7 +203,7 @@ class LoginActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<SuccessResponse>, response: Response<SuccessResponse>) {
|
||||
if (response.body() != null && response.body().isSuccess) {
|
||||
if (response.body() != null && response.body()!!.isSuccess) {
|
||||
mFirebaseAnalytics!!.logEvent(FirebaseAnalytics.Event.LOGIN, Bundle())
|
||||
goToMain()
|
||||
} else {
|
||||
|
@ -53,12 +53,12 @@ class ReaderActivity : DragDismissActivity() {
|
||||
parser.parseUrl(url).enqueue(object : Callback<ParsedContent> {
|
||||
override fun onResponse(call: Call<ParsedContent>, response: Response<ParsedContent>) {
|
||||
if (response.body() != null) {
|
||||
source.text = response.body().domain
|
||||
title.text = response.body().title
|
||||
if (response.body().content != null && !response.body().content.isEmpty())
|
||||
content.setHtml(response.body().content, HtmlHttpImageGetter(content, null, true))
|
||||
if (response.body().lead_image_url != null && !response.body().lead_image_url.isEmpty())
|
||||
Glide.with(applicationContext).load(response.body().lead_image_url).asBitmap().fitCenter().into(image)
|
||||
source.text = response.body()!!.domain
|
||||
title.text = response.body()!!.title
|
||||
if (response.body()!!.content != null && !response.body()!!.content.isEmpty())
|
||||
content.setHtml(response.body()!!.content, HtmlHttpImageGetter(content, null, true))
|
||||
if (response.body()!!.lead_image_url != null && !response.body()!!.lead_image_url.isEmpty())
|
||||
Glide.with(applicationContext).load(response.body()!!.lead_image_url).asBitmap().fitCenter().into(image)
|
||||
hideProgressBar()
|
||||
} else {
|
||||
errorAfterMercuryCall()
|
||||
|
@ -36,7 +36,7 @@ class SourcesActivity : AppCompatActivity() {
|
||||
|
||||
api.sources.enqueue(object : Callback<List<Sources>> {
|
||||
override fun onResponse(call: Call<List<Sources>>, response: Response<List<Sources>>) {
|
||||
if (response.body() != null && response.body().isNotEmpty()) {
|
||||
if (response.body() != null && response.body()!!.isNotEmpty()) {
|
||||
items = response.body() as ArrayList<Sources>
|
||||
}
|
||||
val mAdapter = SourcesListAdapter(this@SourcesActivity, items, api)
|
||||
|
@ -84,7 +84,7 @@ class SourcesListAdapter(private val app: Activity, private val items: ArrayList
|
||||
val (id) = items[adapterPosition]
|
||||
api.deleteSource(id).enqueue(object : Callback<SuccessResponse> {
|
||||
override fun onResponse(call: Call<SuccessResponse>, response: Response<SuccessResponse>) {
|
||||
if (response.body() != null && response.body().isSuccess) {
|
||||
if (response.body() != null && response.body()!!.isSuccess) {
|
||||
items.removeAt(adapterPosition)
|
||||
notifyItemRemoved(adapterPosition)
|
||||
notifyItemRangeChanged(adapterPosition, itemCount)
|
||||
|
@ -6,11 +6,9 @@ import android.content.SharedPreferences
|
||||
import android.net.Uri
|
||||
import android.support.v7.app.AlertDialog
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import android.util.Patterns
|
||||
import apps.amine.bou.readerforselfoss.BuildConfig
|
||||
import apps.amine.bou.readerforselfoss.R
|
||||
import com.google.firebase.crash.FirebaseCrash
|
||||
import com.google.firebase.remoteconfig.FirebaseRemoteConfig
|
||||
import okhttp3.HttpUrl
|
||||
|
||||
@ -57,8 +55,6 @@ fun checkApkVersion(settings: SharedPreferences, editor: SharedPreferences.Edito
|
||||
if (task.isSuccessful) {
|
||||
mFirebaseRemoteConfig.activateFetched()
|
||||
} else {
|
||||
FirebaseCrash.logcat(Log.DEBUG, "CONFIG FETCH", "remote config task unsuccessful")
|
||||
FirebaseCrash.report(Exception(task.exception))
|
||||
}
|
||||
|
||||
isThereAnUpdate(settings, editor, context, mFirebaseRemoteConfig)
|
||||
|
BIN
app/src/main/res/drawable-hdpi/ic_refresh.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_refresh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 422 B |
BIN
app/src/main/res/drawable-mdpi/ic_refresh.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_refresh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 276 B |
BIN
app/src/main/res/drawable-xhdpi/ic_refresh.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_refresh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 557 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_refresh.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_refresh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 787 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_refresh.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_refresh.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
@ -10,7 +10,7 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/refresh"
|
||||
android:icon="@drawable/quantum_ic_refresh_white_24"
|
||||
android:icon="@drawable/ic_refresh"
|
||||
android:orderInCategory="99"
|
||||
android:title="@string/menu_home_refresh"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
Loading…
Reference in New Issue
Block a user