Upgrade support and lifecycle libraries

This commit is contained in:
Moez Bhatti
2018-03-05 23:03:22 -05:00
parent 9e0aaaf7a4
commit edca14c369
9 changed files with 14 additions and 13 deletions
+3 -2
View File
@@ -2,12 +2,13 @@
buildscript {
ext.autodispose_version = '0.5.1'
ext.constraintlayout_version = '1.1.0-beta5'
ext.kotlin_version = '1.2.20'
ext.lifecycle_version = '1.0.0'
ext.lifecycle_version = '1.1.0'
ext.realm_version = '4.3.1'
ext.realm_adapters_version = '2.1.0'
ext.rxbinding_version = '2.0.0'
ext.support_version = '27.0.2'
ext.support_version = '27.1.0'
repositories {
+2 -2
View File
@@ -6,7 +6,7 @@ apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
buildToolsVersion "27.0.3"
flavorDimensions "analytics"
defaultConfig {
@@ -52,6 +52,7 @@ dependencies {
// support
implementation "com.android.support:appcompat-v7:$support_version"
implementation "com.android.support.constraint:constraint-layout:$constraintlayout_version"
implementation "com.android.support:design:$support_version"
// rxbinding
@@ -74,7 +75,6 @@ dependencies {
})
implementation "androidx.core:core-ktx:0.1"
implementation "com.android.billingclient:billing:1.0"
implementation "com.android.support.constraint:constraint-layout:1.1.0-beta4"
implementation "com.bugsnag:bugsnag-android:4.1.1"
implementation "com.github.chrisbanes:PhotoView:2.0.0"
implementation "com.f2prateek.rx.preferences2:rx-preferences:2.0.0-RC3"
@@ -35,7 +35,7 @@ class BlockedAdapter @Inject constructor(private val context: Context) : Flowabl
val unblock: PublishSubject<Long> = PublishSubject.create()
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): QkViewHolder {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): QkViewHolder {
return QkViewHolder(LayoutInflater.from(context).inflate(R.layout.blocked_list_item, parent, false))
}
@@ -61,7 +61,7 @@ class AttachmentAdapter @Inject constructor(
return QkViewHolder(view)
}
override fun onDetachedFromRecyclerView(recyclerView: RecyclerView?) {
override fun onDetachedFromRecyclerView(recyclerView: RecyclerView) {
super.onDetachedFromRecyclerView(recyclerView)
disposables.clear()
}
@@ -37,7 +37,7 @@ class ContactAdapter @Inject constructor(private val context: Context) : QkAdapt
val contactSelected: Subject<Contact> = PublishSubject.create()
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): QkViewHolder {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): QkViewHolder {
val layoutRes = R.layout.contact_list_item
val layoutInflater = LayoutInflater.from(context)
val view = layoutInflater.inflate(layoutRes, parent, false)
@@ -80,7 +80,7 @@ class MessagesAdapter @Inject constructor(
* this a unique viewType even though it uses the same view, so that regular messages
* don't need clipToOutline set to true, and they don't need to worry about images
*/
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): QkViewHolder {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): QkViewHolder {
val layoutInflater = LayoutInflater.from(context)
val view: View
@@ -44,7 +44,7 @@ class ConversationMediaAdapter @Inject constructor(
private val disposables = CompositeDisposable()
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): QkViewHolder {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): QkViewHolder {
val view = LayoutInflater.from(context).inflate(R.layout.conversation_media_list_item, parent, false)
disposables += colors.separator.subscribe { color -> view.setBackgroundColor(color) }
@@ -65,7 +65,7 @@ class ConversationMediaAdapter @Inject constructor(
view.thumbnail.setOnClickListener { thumbnailClicks.onNext(it) }
}
override fun onDetachedFromRecyclerView(recyclerView: RecyclerView?) {
override fun onDetachedFromRecyclerView(recyclerView: RecyclerView) {
disposables.clear()
}
@@ -54,7 +54,7 @@ class ConversationsAdapter @Inject constructor(
private val disposables = CompositeDisposable()
override fun onCreateViewHolder(parent: ViewGroup?, viewType: Int): QkViewHolder {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): QkViewHolder {
val layoutRes = when (viewType) {
0 -> R.layout.conversation_list_item
else -> R.layout.conversation_list_item_unread
@@ -113,12 +113,12 @@ class ThemeAdapter @Inject constructor(
.forEach { theme -> view.palette.addView(theme) }
}
override fun onAttachedToRecyclerView(recyclerView: RecyclerView?) {
override fun onAttachedToRecyclerView(recyclerView: RecyclerView) {
disposables += colors.textPrimaryOnTheme
.subscribe { color -> iconTint = color }
}
override fun onDetachedFromRecyclerView(recyclerView: RecyclerView?) {
override fun onDetachedFromRecyclerView(recyclerView: RecyclerView) {
disposables.clear()
}