v2.7.5。バグ修正

This commit is contained in:
tateisu 2018-08-25 10:05:27 +09:00
parent f26a74b469
commit ae2102077a
2 changed files with 5 additions and 12 deletions

View File

@ -12,8 +12,8 @@ android {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 27 targetSdkVersion 27
versionCode 274 versionCode 275
versionName "2.7.4" versionName "2.7.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// https://stackoverflow.com/questions/47791227/java-lang-illegalstateexception-dex-archives-setting-dex-extension-only-for // https://stackoverflow.com/questions/47791227/java-lang-illegalstateexception-dex-archives-setting-dex-extension-only-for

View File

@ -4698,14 +4698,7 @@ class Column(
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// Streaming // Streaming
private fun getId(o : Any) : EntityId? {
return when(o) {
is TootNotification -> o.id
is TootStatus -> o.id
is TootAccount -> o.id
else -> null
}
}
internal fun onStart(callback : Callback) { internal fun onStart(callback : Callback) {
this.callback_ref = WeakReference(callback) this.callback_ref = WeakReference(callback)
@ -5025,7 +5018,7 @@ class Column(
var new_id_min : EntityId? = null var new_id_min : EntityId? = null
for(o in list_new) { for(o in list_new) {
try { try {
val id = getId(o) ?: continue val id = o.getOrderId()
if( id.toString().isEmpty() ) continue if( id.toString().isEmpty() ) continue
if(new_id_max == null || id > new_id_max) new_id_max = id if(new_id_max == null || id > new_id_max) new_id_max = id
if(new_id_min == null || id < new_id_min) new_id_min = id if(new_id_min == null || id < new_id_min) new_id_min = id
@ -5066,7 +5059,7 @@ class Column(
bPutGap = false bPutGap = false
try { try {
if(list_data.size > 0 && new_id_min != null) { if(list_data.size > 0 && new_id_min != null) {
val since = getId(list_data[0]) val since = list_data[0].getOrderId()
if(since != null && new_id_min > since) { if(since != null && new_id_min > since) {
val gap = TootGap(new_id_min, since) val gap = TootGap(new_id_min, since)
list_new.add(gap) list_new.add(gap)