mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 19:38:52 +01:00
feat: rename group conversations
This commit is contained in:
@@ -42,7 +42,8 @@ class DateFormatter @Inject constructor(val context: Context) {
|
||||
formattedPattern = formattedPattern
|
||||
.replace("h", "HH")
|
||||
.replace("K", "HH")
|
||||
.replace(" a".toRegex(), "")
|
||||
.replace("a", "")
|
||||
.trim()
|
||||
}
|
||||
|
||||
return SimpleDateFormat(formattedPattern, Locale.getDefault())
|
||||
|
||||
+4
@@ -42,6 +42,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxkotlin.Observables
|
||||
import io.reactivex.rxkotlin.plusAssign
|
||||
import io.reactivex.rxkotlin.withLatestFrom
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import io.reactivex.subjects.BehaviorSubject
|
||||
import io.reactivex.subjects.Subject
|
||||
import javax.inject.Inject
|
||||
@@ -145,7 +146,10 @@ class ConversationInfoPresenter @Inject constructor(
|
||||
view.nameChanges()
|
||||
.withLatestFrom(conversation) { name, conversation ->
|
||||
conversationRepo.setConversationName(conversation.id, name)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
}
|
||||
.flatMapCompletable { it }
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user