Merge pull request #358 from pavelpoley/fix/scroll-position-reseting
Fix scroll position resetting on refresh
This commit is contained in:
commit
88f47ae10b
|
@ -227,6 +227,11 @@ class ThreadActivity : SimpleActivity() {
|
||||||
ArrayList()
|
ArrayList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
messages.sortBy { it.date }
|
||||||
|
if (messages.size > MESSAGES_LIMIT) {
|
||||||
|
messages = ArrayList(messages.takeLast(MESSAGES_LIMIT))
|
||||||
|
}
|
||||||
|
|
||||||
setupParticipants()
|
setupParticipants()
|
||||||
setupAdapter()
|
setupAdapter()
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.simplemobiletools.smsmessenger.helpers
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import com.simplemobiletools.commons.helpers.BaseConfig
|
import com.simplemobiletools.commons.helpers.BaseConfig
|
||||||
import com.simplemobiletools.smsmessenger.models.Conversation
|
import com.simplemobiletools.smsmessenger.models.Conversation
|
||||||
import java.util.HashSet
|
|
||||||
|
|
||||||
class Config(context: Context) : BaseConfig(context) {
|
class Config(context: Context) : BaseConfig(context) {
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
package com.simplemobiletools.smsmessenger.models
|
package com.simplemobiletools.smsmessenger.models
|
||||||
|
|
||||||
open class ThreadDateTime(val date: Int, val simID: String) : ThreadItem()
|
data class ThreadDateTime(val date: Int, val simID: String) : ThreadItem()
|
||||||
|
|
Loading…
Reference in New Issue