fixed read on main thread

updated version
This commit is contained in:
Mariotaku Lee 2017-05-12 18:12:28 +08:00
parent c019ae33ad
commit e48a39979a
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
6 changed files with 9 additions and 7 deletions

View File

@ -56,7 +56,7 @@ subprojects {
KPreferences : '0.9.7',
Kovenant : '3.3.0',
ParcelablePlease : '1.0.2',
Chameleon : '0.9.17',
Chameleon : '0.9.18',
UniqR : '0.9.1',
SQLiteQB : '0.9.15',
Glide : '3.7.0',

View File

@ -41,8 +41,8 @@ android {
applicationId "org.mariotaku.twidere"
minSdkVersion project.properties['overrideMinSdkVersion'] ?: 14
targetSdkVersion 25
versionCode 362
versionName '3.6.2'
versionCode 363
versionName '3.6.3'
multiDexEnabled true
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("true")'

View File

@ -22,9 +22,6 @@ package org.mariotaku.twidere.extension.model
import org.mariotaku.twidere.model.RefreshTaskParam
import org.mariotaku.twidere.model.pagination.SinceMaxPagination
val RefreshTaskParam.hasMaxIds: Boolean
get() = pagination?.any { (it as? SinceMaxPagination)?.maxId != null } ?: false
fun RefreshTaskParam.getMaxId(index: Int): String? {
return (pagination?.get(index) as? SinceMaxPagination)?.maxId
}

View File

@ -192,6 +192,9 @@ abstract class CursorStatusesFragment : AbsStatusesFragment() {
override val shouldAbort: Boolean
get() = context == null
override val hasMaxIds: Boolean
get() = false
})
return true
}

View File

@ -23,7 +23,6 @@ import org.mariotaku.sqliteqb.library.Expression
import org.mariotaku.twidere.TwidereConstants.NOTIFICATION_ID_HOME_TIMELINE
import org.mariotaku.twidere.annotation.ReadPositionTag
import org.mariotaku.twidere.constant.IntentConstants.EXTRA_EXTRAS
import org.mariotaku.twidere.extension.model.hasMaxIds
import org.mariotaku.twidere.model.ParameterizedExpression
import org.mariotaku.twidere.model.RefreshTaskParam
import org.mariotaku.twidere.model.UserKey

View File

@ -1,6 +1,7 @@
package org.mariotaku.twidere.model
import org.mariotaku.twidere.model.pagination.Pagination
import org.mariotaku.twidere.model.pagination.SinceMaxPagination
/**
* Created by mariotaku on 16/2/14.
@ -18,4 +19,6 @@ interface RefreshTaskParam {
val isBackground: Boolean get() = false
val hasMaxIds: Boolean
get() = pagination?.any { (it as? SinceMaxPagination)?.maxId != null } ?: false
}