reverted part of "reverted to kotlin 1.0.6"

This commit is contained in:
Mariotaku Lee 2017-03-04 20:40:25 +08:00
parent e51ab95099
commit fbd722198d
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
3 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ subprojects {
buildscript {
ext {
libVersions = [
Kotlin : '1.0.6',
Kotlin : '1.1.0',
SupportLib : '25.2.0',
MariotakuCommons: '0.9.11',
RestFu : '0.9.35',

View File

@ -96,7 +96,7 @@ fun RequestManager.loadProfileImage(context: Context, conversation: ParcelableMe
fun RequestManager.loadOriginalProfileImage(context: Context, user: ParcelableUser,
@ImageShapeStyle shapeStyle: Int = ImageShapeStyle.SHAPE_CIRCLE): DrawableRequestBuilder<String> {
val original = user.extras.profile_image_url_original?.let { if (it.isEmpty()) null else it }
val original = user.extras.profile_image_url_original?.takeUnless(String::isEmpty)
?: Utils.getOriginalTwitterProfileImage(user.profile_image_url)
return configureLoadProfileImage(context, shapeStyle) { load(original) }
}

View File

@ -6,5 +6,5 @@ import android.content.SharedPreferences
* Created by mariotaku on 16/8/25.
*/
fun SharedPreferences.getNonEmptyString(key: String, def: String): String {
return getString(key, def)?.let { if (it.isEmpty()) null else it } ?: def
return getString(key, def)?.takeUnless(String::isEmpty) ?: def
}