Merge remote-tracking branch 'tuskyapp/develop'
This commit is contained in:
commit
928b7c5876
|
@ -104,7 +104,7 @@ project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
|||
}
|
||||
|
||||
ext.lifecycleVersion = "2.2.0"
|
||||
ext.roomVersion = '2.2.5'
|
||||
ext.roomVersion = '2.3.0'
|
||||
ext.retrofitVersion = '2.9.0'
|
||||
ext.okhttpVersion = '4.9.0'
|
||||
ext.glideVersion = '4.11.0'
|
||||
|
|
|
@ -18,25 +18,27 @@ package com.keylesspalace.tusky.db
|
|||
import android.text.Spanned
|
||||
import androidx.core.text.parseAsHtml
|
||||
import androidx.core.text.toHtml
|
||||
import androidx.room.ProvidedTypeConverter
|
||||
import androidx.room.TypeConverter
|
||||
import com.google.gson.GsonBuilder
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.keylesspalace.tusky.STREAMING
|
||||
import com.keylesspalace.tusky.TabData
|
||||
import com.keylesspalace.tusky.components.conversation.ConversationAccountEntity
|
||||
import com.keylesspalace.tusky.createTabDataFromId
|
||||
import com.keylesspalace.tusky.entity.*
|
||||
import com.keylesspalace.tusky.json.SpannedTypeAdapter
|
||||
import com.keylesspalace.tusky.util.trimTrailingWhitespace
|
||||
import java.net.URLDecoder
|
||||
import java.net.URLEncoder
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
class Converters {
|
||||
|
||||
private val gson = GsonBuilder()
|
||||
.registerTypeAdapter(Spanned::class.java, SpannedTypeAdapter())
|
||||
.create()
|
||||
@ProvidedTypeConverter
|
||||
@Singleton
|
||||
class Converters @Inject constructor (
|
||||
private val gson: Gson
|
||||
) {
|
||||
|
||||
@TypeConverter
|
||||
fun jsonToEmojiList(emojiListJson: String?): List<Emoji>? {
|
||||
|
|
|
@ -28,6 +28,7 @@ import com.keylesspalace.tusky.appstore.EventHubImpl
|
|||
import com.keylesspalace.tusky.components.notifications.Notifier
|
||||
import com.keylesspalace.tusky.components.notifications.SystemNotifier
|
||||
import com.keylesspalace.tusky.db.AppDatabase
|
||||
import com.keylesspalace.tusky.db.Converters
|
||||
import com.keylesspalace.tusky.network.MastodonApi
|
||||
import com.keylesspalace.tusky.network.TimelineCases
|
||||
import com.keylesspalace.tusky.network.TimelineCasesImpl
|
||||
|
@ -70,8 +71,9 @@ class AppModule {
|
|||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun providesDatabase(appContext: Context): AppDatabase {
|
||||
fun providesDatabase(appContext: Context, converters: Converters): AppDatabase {
|
||||
return Room.databaseBuilder(appContext, AppDatabase::class.java, "tuskyDB")
|
||||
.addTypeConverter(converters)
|
||||
.allowMainThreadQueries()
|
||||
.addMigrations(AppDatabase.MIGRATION_2_3, AppDatabase.MIGRATION_3_4, AppDatabase.MIGRATION_4_5,
|
||||
AppDatabase.MIGRATION_5_6, AppDatabase.MIGRATION_6_7, AppDatabase.MIGRATION_7_8,
|
||||
|
|
|
@ -425,7 +425,7 @@ class TimelineFragment : SFragment(), OnRefreshListener, StatusActionListener, I
|
|||
if (!eventRegistered) {
|
||||
eventHub.events
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.autoDispose(from(this))
|
||||
.autoDispose(from(this, Lifecycle.Event.ON_DESTROY))
|
||||
.subscribe { event: Event? ->
|
||||
when (event) {
|
||||
is FavoriteEvent -> handleFavEvent(event)
|
||||
|
|
|
@ -517,4 +517,5 @@
|
|||
<item quantity="other">نمیتوانید بیش از %1$d رسانه بارگذارید.</item>
|
||||
</plurals>
|
||||
<string name="duration_indefinite">نامعیّن</string>
|
||||
<string name="follow_requests_info">با این که حسابتان قفل نیست، کارکنان %1$s فکر کردند ممکن است بخواهید درخواستهای پیگیری از این حسابها را دستی بازبینی کنید.</string>
|
||||
</resources>
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
<string name="title_followers">Người theo dõi</string>
|
||||
<string name="title_follows">Theo dõi</string>
|
||||
<string name="title_statuses_pinned">Ghim</string>
|
||||
<string name="title_statuses_with_replies">Rép</string>
|
||||
<string name="title_statuses_with_replies">Trả lời</string>
|
||||
<string name="title_statuses">Tút</string>
|
||||
<string name="title_view_thread">Tút</string>
|
||||
<string name="title_tab_preferences">Xếp tab</string>
|
||||
|
@ -203,7 +203,7 @@
|
|||
<string name="title_favourites">Những tút đã thích</string>
|
||||
<string name="link_whats_an_instance">Máy chủ là gì\?</string>
|
||||
<string name="pref_title_show_media_preview">Tải xem trước hình ảnh</string>
|
||||
<string name="pref_title_show_replies">Hiện lượt trả lời</string>
|
||||
<string name="pref_title_show_replies">Hiện những trả lời</string>
|
||||
<string name="pref_title_show_boosts">Hiện lượt chia sẻ</string>
|
||||
<string name="pref_title_status_tabs">Tabs</string>
|
||||
<string name="pref_title_status_filter">Lọc bảng tin</string>
|
||||
|
@ -340,16 +340,16 @@
|
|||
<string name="hint_additional_info">Thêm ghi chú</string>
|
||||
<string name="report_sent_success">Đã gửi báo cáo @%s</string>
|
||||
<plurals name="poll_timespan_seconds">
|
||||
<item quantity="other">%d giây nữa kết thúc</item>
|
||||
<item quantity="other">%d giây</item>
|
||||
</plurals>
|
||||
<plurals name="poll_timespan_minutes">
|
||||
<item quantity="other">%d phút nữa kết thúc</item>
|
||||
<item quantity="other">%d phút</item>
|
||||
</plurals>
|
||||
<plurals name="poll_timespan_hours">
|
||||
<item quantity="other">%d giờ nữa kết thúc</item>
|
||||
<item quantity="other">%d giờ</item>
|
||||
</plurals>
|
||||
<plurals name="poll_timespan_days">
|
||||
<item quantity="other">%d ngày nữa kết thúc</item>
|
||||
<item quantity="other">%d ngày</item>
|
||||
</plurals>
|
||||
<string name="poll_ended_created">Cuộc bình chọn của bạn đã kết thúc</string>
|
||||
<string name="poll_ended_voted">Cuộc bình chọn đã kết thúc</string>
|
||||
|
@ -357,12 +357,12 @@
|
|||
<string name="poll_info_closed">xong</string>
|
||||
<string name="poll_info_time_absolute">kết thúc lúc %s</string>
|
||||
<plurals name="poll_info_people">
|
||||
<item quantity="other">%s người đã bình chọn</item>
|
||||
<item quantity="other">%s người bình chọn</item>
|
||||
</plurals>
|
||||
<plurals name="poll_info_votes">
|
||||
<item quantity="other">%s người bình chọn</item>
|
||||
</plurals>
|
||||
<string name="poll_info_format"> <!-- 15 người bình chọn • 1 giờ nữa kết thúc --> %1$s • %2$s</string>
|
||||
<string name="poll_info_format"> <!-- 15 người bình chọn • còn 1 giờ --> %1$s • %2$s</string>
|
||||
<string name="compose_preview_image_description">Mô tả cho hình %s</string>
|
||||
<string name="compose_shortcut_short_label">Viết</string>
|
||||
<string name="compose_shortcut_long_label">Viết tút</string>
|
||||
|
@ -476,7 +476,7 @@
|
|||
\n - Số Người theo dõi/Tút trên trang cá nhân
|
||||
\n
|
||||
\nThông báo đẩy sẽ không ảnh hưởng, bạn có thể tự thiết lập trong phần cài đặt điện thoại của bạn.</string>
|
||||
<string name="pref_title_wellbeing_mode">Cai nghiện</string>
|
||||
<string name="pref_title_wellbeing_mode">Chống nghiện</string>
|
||||
<string name="notification_subscription_description">Thông báo khi người bạn đăng ký theo dõi đăng tút mới</string>
|
||||
<string name="notification_subscription_name">Tút mới</string>
|
||||
<string name="pref_title_notification_filter_subscriptions">người tôi đăng ký theo dõi đăng tút mới</string>
|
||||
|
|
Loading…
Reference in New Issue