reverted to kotlin 1.0.6

This commit is contained in:
Mariotaku Lee 2017-03-04 14:07:14 +08:00
parent 9e45c9b261
commit 8391f5dd0f
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
8 changed files with 9 additions and 23 deletions

View File

@ -72,7 +72,7 @@ before_script:
- test -f twidere/src/google/AndroidManifest.xml - test -f twidere/src/google/AndroidManifest.xml
script: script:
- ./gradlew build - ./gradlew clean build
deploy: deploy:
provider: releases provider: releases

View File

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

View File

@ -1,15 +1 @@
# Project-wide Gradle settings. org.gradle.jvmargs=-Xmx4096M
# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx10248m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.jvmargs=-Xmx2048M

View File

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

View File

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

View File

@ -683,7 +683,7 @@ class UserFragment : BaseFragment(), OnClickListener, OnLinkClickListener,
}) })
userFragmentView.setWindowInsetsListener { _, top, _, _ -> userFragmentView.setWindowInsetsListener { left, top, right, bottom ->
profileContentContainer.setPadding(0, top, 0, 0) profileContentContainer.setPadding(0, top, 0, 0)
profileBannerSpace.statusBarHeight = top profileBannerSpace.statusBarHeight = top
@ -695,7 +695,7 @@ class UserFragment : BaseFragment(), OnClickListener, OnLinkClickListener,
profileBannerSpace.toolbarHeight = toolbarHeight profileBannerSpace.toolbarHeight = toolbarHeight
} }
} }
profileContentContainer.setOnSizeChangedListener { _, _, _, _, _ -> profileContentContainer.setOnSizeChangedListener { view, w, h, oldw, oldh ->
val toolbarHeight = toolbar.measuredHeight val toolbarHeight = toolbar.measuredHeight
userProfileDrawer.setPadding(0, toolbarHeight, 0, 0) userProfileDrawer.setPadding(0, toolbarHeight, 0, 0)
profileBannerSpace.toolbarHeight = toolbarHeight profileBannerSpace.toolbarHeight = toolbarHeight

View File

@ -30,7 +30,7 @@ class SelectableUserViewHolder(
itemView: View, itemView: View,
adapter: SelectableUsersAdapter adapter: SelectableUsersAdapter
) : SimpleUserViewHolder<SelectableUsersAdapter>(itemView, adapter) { ) : SimpleUserViewHolder<SelectableUsersAdapter>(itemView, adapter) {
private val checkChangedListener = CompoundButton.OnCheckedChangeListener { _, value -> private val checkChangedListener = CompoundButton.OnCheckedChangeListener { view, value ->
adapter.setItemChecked(layoutPosition, value) adapter.setItemChecked(layoutPosition, value)
} }

View File

@ -592,7 +592,7 @@ class StatusViewHolder(private val adapter: IStatusesAdapter<*>, itemView: View)
refreshDrawableState() refreshDrawableState()
} }
private inline val Array<ParcelableMedia?>.type: Int get() { private val Array<ParcelableMedia?>.type: Int get() {
forEach { if (it != null) return it.type } forEach { if (it != null) return it.type }
return 0 return 0
} }