fixed message date label

This commit is contained in:
Mariotaku Lee 2017-09-08 23:17:10 +08:00
parent e3978b91bf
commit 10c5f3fd34
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
5 changed files with 17 additions and 7 deletions

View File

@ -38,7 +38,7 @@ android {
versionName projectVersionName
multiDexEnabled true
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("true")'
buildConfigField 'boolean', 'LEAK_CANARY_ENABLED', 'Boolean.parseBoolean("false")'
buildConfigField 'boolean', 'SHOW_CUSTOM_TOKEN_DIALOG', 'Boolean.parseBoolean("false")'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

View File

@ -1,7 +1,8 @@
package android.support.v4.content
import android.content.Context
import android.os.AsyncTask
import org.mariotaku.twidere.extension.set
import org.mariotaku.twidere.util.Analyzer
/**
@ -10,7 +11,16 @@ import org.mariotaku.twidere.util.Analyzer
abstract class FixedAsyncTaskLoader<D>(context: Context) : AsyncTaskLoader<D>(context) {
internal override fun executePendingTask() {
init {
try {
val executorField = javaClass.getDeclaredField("mExecutor")
this[executorField] = AsyncTask.SERIAL_EXECUTOR
} catch (e: Exception) {
// Ignore
}
}
override fun executePendingTask() {
try {
super.executePendingTask()
} catch (e: IllegalStateException) {

View File

@ -182,6 +182,7 @@ class MessagesConversationAdapter(
val messages = this.messages!!
if (messages is ObjectCursor) {
val cursor = messages.cursor
cursor.moveToPosition(position)
val indices = messages.indices
val timestamp = cursor.getLong(indices[Messages.MESSAGE_TIMESTAMP])
if (timestamp > 0) return timestamp

View File

@ -44,7 +44,6 @@ import org.mariotaku.kpreferences.get
import org.mariotaku.kpreferences.set
import org.mariotaku.ktextension.addOnAccountsUpdatedListenerSafe
import org.mariotaku.ktextension.isCurrentThreadCompat
import org.mariotaku.ktextension.localesCompat
import org.mariotaku.mediaviewer.library.MediaDownloader
import org.mariotaku.restfu.http.RestHttpClient
import org.mariotaku.twidere.BuildConfig

View File

@ -548,7 +548,7 @@ object IntentUtils {
val builder = Uri.Builder()
builder.scheme(SCHEME_TWIDERE_SETTINGS)
builder.authority(initialTag.orEmpty())
return builder.intent()
return builder.intent(Intent.ACTION_MAIN)
}
fun openProfileEditor(context: Context, accountKey: UserKey?) {
@ -576,8 +576,8 @@ object IntentUtils {
}
val builder = CustomTabsIntent.Builder()
builder.addDefaultShareMenuItem()
theme?.let { theme ->
builder.setToolbarColor(theme.colorToolbar)
theme?.let { t ->
builder.setToolbarColor(t.colorToolbar)
}
val customTabsIntent = builder.build()
val intent = customTabsIntent.intent