Upgrade dependencies, use new Timber's overloaded method for errors

This commit is contained in:
len 2016-09-08 18:30:29 +02:00
parent ccdc336112
commit 6a30a75e3e
17 changed files with 30 additions and 30 deletions

View File

@ -83,7 +83,7 @@ android {
dependencies {
// Modified dependencies
compile 'com.github.inorichi:subsampling-scale-image-view:421fb81'
compile 'com.github.inorichi:subsampling-scale-image-view:2d9c854'
compile 'com.github.inorichi:ReactiveNetwork:69092ed'
// Android support library
@ -100,7 +100,7 @@ dependencies {
// ReactiveX
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.8'
compile 'io.reactivex:rxjava:1.1.10'
compile 'com.f2prateek.rx.preferences:rx-preferences:1.0.2'
// Network client
@ -113,7 +113,7 @@ dependencies {
compile "com.squareup.retrofit2:adapter-rxjava:$retrofit_version"
// IO
compile 'com.squareup.okio:okio:1.9.0'
compile 'com.squareup.okio:okio:1.10.0'
// JSON
compile 'com.google.code.gson:gson:2.7'
@ -151,7 +151,7 @@ dependencies {
compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
// Logging
compile 'com.jakewharton.timber:timber:4.1.2'
compile 'com.jakewharton.timber:timber:4.3.0'
// Crash reports
compile 'ch.acra:acra:4.9.0'

View File

@ -80,10 +80,10 @@ class DownloadManager(
if (areAllDownloadsFinished()) {
DownloadService.stop(context)
}
}, { e ->
}, { error ->
DownloadService.stop(context)
Timber.e(e, e.message)
downloadNotifier.onError(e.message)
Timber.e(error)
downloadNotifier.onError(error.message)
})
if (!isRunning) {
@ -369,8 +369,8 @@ class DownloadManager(
try {
it.write(gson.toJson(pages).toByteArray())
it.flush()
} catch (e: Exception) {
Timber.e(e, e.message)
} catch (error: Exception) {
Timber.e(error)
}
}
}

View File

@ -121,8 +121,8 @@ class UpdateDownloaderService : IntentService(UpdateDownloaderService::class.jav
UpdateNotificationReceiver.cancelNotificationIntent(ctx))
}
} catch (e: Exception) {
Timber.e(e, e.message)
} catch (error: Exception) {
Timber.e(error)
// Prompt the user to retry the download.
NotificationCompat.Builder(this).update {

View File

@ -121,9 +121,9 @@ class BackupFragment : BaseRxFragment<BackupPresenter>() {
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
presenter.restoreBackup(it)
}, {
context.toast(it.message)
Timber.e(it, it.message)
}, { error ->
context.toast(error.message)
Timber.e(error)
})
.apply { subscriptions.add(this) }

View File

@ -332,7 +332,7 @@ class CatalogueFragment : BaseRxFragment<CataloguePresenter>(), FlexibleViewHold
*/
fun onAddPageError(error: Throwable) {
hideProgressBar()
Timber.e(error, error.message)
Timber.e(error)
catalogue_view.snack(error.message ?: "", Snackbar.LENGTH_INDEFINITE) {
setAction(R.string.action_retry) {

View File

@ -143,7 +143,7 @@ class CataloguePresenter : BasePresenter<CatalogueFragment>() {
.subscribeReplay({ view, page ->
view.onAddPage(page.page, page.mangas)
}, { view, error ->
Timber.e(error, error.message)
Timber.e(error)
})
// Request first page.
@ -211,7 +211,7 @@ class CataloguePresenter : BasePresenter<CatalogueFragment>() {
@Suppress("DEPRECATION")
view?.onMangaInitialized(manga)
}, { error ->
Timber.e(error, error.message)
Timber.e(error)
})
.apply { add(this) }
}

View File

@ -35,7 +35,7 @@ class DownloadPresenter : BasePresenter<DownloadFragment>() {
.subscribeLatestCache({ view, downloads ->
view.onNextDownloads(downloads)
}, { view, error ->
Timber.e(error, error.message)
Timber.e(error)
})
}

View File

@ -427,7 +427,7 @@ class LibraryFragment : BaseRxFragment<LibraryPresenter>(), ActionMode.Callback
}
} catch (error: IOException) {
context.toast(R.string.notification_manga_update_failed)
Timber.e(error, error.message)
Timber.e(error)
}
}

View File

@ -376,7 +376,7 @@ class ChaptersFragment : BaseRxFragment<ChaptersPresenter>(), ActionMode.Callbac
fun onChaptersDeletedError(error: Throwable) {
dismissDeletingDialog()
Timber.e(error, error.message)
Timber.e(error)
}
fun dismissDeletingDialog() {

View File

@ -111,7 +111,7 @@ class ChaptersPresenter : BasePresenter<ChaptersFragment>() {
startableLatestCache(CHAPTER_STATUS_CHANGES,
{ getChapterStatusObservable() },
{ view, download -> view.onChapterStatusChange(download) },
{ view, error -> Timber.e(error.cause, error.message) })
{ view, error -> Timber.e(error) })
// Find the active manga from the shared data or return.
manga = SharedData.get(MangaEvent::class.java)?.manga ?: return

View File

@ -102,7 +102,7 @@ class MyAnimeListPresenter : BasePresenter<MyAnimeListFragment>() {
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ next -> },
{ error ->
Timber.e(error, error.message)
Timber.e(error)
// Restart on error to set old values
start(GET_MANGA_SYNC)
}))

View File

@ -42,9 +42,9 @@ class ChapterLoader(
.repeat()
.subscribeOn(Schedulers.io())
.subscribe({
}, {
if (it !is InterruptedException) {
Timber.e(it, it.message)
}, { error ->
if (error !is InterruptedException) {
Timber.e(error)
}
})
}

View File

@ -213,7 +213,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
}
fun onChapterError(error: Throwable) {
Timber.e(error, error.message)
Timber.e(error)
finish()
toast(error.message)
}

View File

@ -253,7 +253,7 @@ class RecentChaptersFragment
*/
fun onChaptersDeletedError(error: Throwable) {
dismissDeletingDialog()
Timber.e(error, error.message)
Timber.e(error)
}
/**

View File

@ -71,7 +71,7 @@ class RecentChaptersPresenter : BasePresenter<RecentChaptersFragment>() {
// Set chapter status
view.onChapterStatusChange(download)
},
{ view, error -> Timber.e(error.cause, error.message) }
{ view, error -> Timber.e(error) }
)
if (savedState == null) {

View File

@ -115,7 +115,7 @@ class RecentlyReadPresenter : BasePresenter<RecentlyReadFragment>() {
.subscribeFirst({ view, chapter ->
view.onOpenNextChapter(chapter, manga)
}, { view, error ->
Timber.e(error, error.message)
Timber.e(error)
})
}

View File

@ -133,7 +133,7 @@ class SettingsAboutFragment : SettingsFragment() {
}
}
}, { error ->
Timber.e(error, error.message)
Timber.e(error)
})
}