Skip to content
Snippets Groups Projects
Commit 482a346a authored by Jawnnypoo's avatar Jawnnypoo
Browse files

Fix nullability with OkHttp. Don't crash on timeout from Okio

parent 826e1b07
No related branches found
No related tags found
No related merge requests found
Pipeline #
Change Log
==========
Version 2.4.6
----------------------------
- Pipelines! Thanks to @nprail
- Full screen image viewer for Markdown images thanks to @adi.bk
- Fix crash when attempting to edit a file
- Make build names make sense
- Fix visibility issues with widgets
- Bump API call timeouts to 30 seconds since they were failing often on GitLab.com
Loading
Loading
@@ -18,7 +18,7 @@ apply plugin: 'io.fabric'
 
def versionMajor = 2
def versionMinor = 4
def versionPatch = 5
def versionPatch = 6
def versionBuild = 0 // bump for dogfood builds, public betas, etc.
 
android {
Loading
Loading
@@ -74,21 +74,21 @@ android {
 
ext {
supportLibVersion = '25.3.1'
retrofitVersion = '2.2.0'
okHttpVersion = '3.7.0'
butterknifeVersion = '8.5.1'
retrofitVersion = '2.3.0'
okHttpVersion = '3.8.0'
butterknifeVersion = '8.6.0'
loganSquareVersion = '1.3.7'
parcelerVersion = '1.1.8'
reptarVersion = '2.4.1'
adapterLayout = '1.1.0'
materialDialogsVersion = '0.9.4.4'
materialDialogsVersion = '0.9.4.5'
leakCanaryVersion = '1.5'
}
 
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
 
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlinVersion"
 
compile "com.android.support:appcompat-v7:$supportLibVersion"
compile "com.android.support:support-v13:$supportLibVersion"
Loading
Loading
@@ -126,7 +126,7 @@ dependencies {
compile 'io.reactivex.rxjava2:rxjava:2.1.0'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
 
compile 'com.trello.rxlifecycle2:rxlifecycle-components:2.0.1'
compile 'com.trello.rxlifecycle2:rxlifecycle-components:2.1.0'
 
compile 'net.danlew:android.joda:2.9.9'
 
Loading
Loading
@@ -174,7 +174,7 @@ dependencies {
 
compile 'com.github.alorma:diff-textview:1.3.0'
 
compile 'com.wdullaer:materialdatetimepicker:3.2.0'
compile 'com.wdullaer:materialdatetimepicker:3.2.2'
 
compile 'com.github.novoda:simple-chrome-custom-tabs:0.1.5'
 
Loading
Loading
Loading
Loading
@@ -13,6 +13,7 @@ import com.commit451.lift.Lift
import com.novoda.simplechromecustomtabs.SimpleChromeCustomTabs
import com.squareup.leakcanary.LeakCanary
import com.squareup.picasso.Picasso
import io.reactivex.plugins.RxJavaPlugins
import net.danlew.android.joda.JodaTimeAndroid
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
Loading
Loading
@@ -52,6 +53,10 @@ open class App : Application() {
}
setupLeakCanary()
instance = this
RxJavaPlugins.setErrorHandler { error ->
//In case an error cannot be thrown properly anywhere else in the app
Timber.e(error)
}
 
GitLab.init()
 
Loading
Loading
Loading
Loading
@@ -434,7 +434,7 @@ class LoginActivity : BaseActivity() {
}
var errorMessage = getString(R.string.login_unauthorized)
try {
val message = LoganSquare.parse(response.errorBody().byteStream(), Message::class.java)
val message = LoganSquare.parse(response.errorBody()!!.byteStream(), Message::class.java)
if (message != null && message.message != null) {
errorMessage = message.message
}
Loading
Loading
@@ -457,7 +457,7 @@ class LoginActivity : BaseActivity() {
}
 
fun handleBasicAuthentication(response: Response<*>) {
val header = response.headers().get("WWW-Authenticate").trim { it <= ' ' }
val header = response.headers().get("WWW-Authenticate")!!.trim { it <= ' ' }
if (!header.startsWith("Basic")) {
Snackbar.make(root, getString(R.string.login_unsupported_authentication), Snackbar.LENGTH_LONG)
.show()
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ import com.commit451.morphtransitions.FabTransform
 
/**
* Activity that morphs from a FAB. Make sure the view you want to morph has the view id R.id.root and
* call [.morph] when the content view is set
* call [.morph] when the content view is set. Does nothing if not on 21+
*/
open class MorphActivity : BaseActivity() {
 
Loading
Loading
@@ -14,7 +14,9 @@ open class MorphActivity : BaseActivity() {
if (root == null) {
throw IllegalStateException("Cannot pass an empty view")
}
FabTransform.setup(this, root)
if (Build.VERSION.SDK_INT >= 21) {
FabTransform.setup(this, root)
}
}
 
override fun onBackPressed() {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment