forked from upstream-mirrors/quik
Remove SetupActivity, perform setup in MainActivity
Squashed commit of the following: commit ff6ece72a60917ceec3ea1485901e8929e65bb43 Author: Moez Bhatti <moez.bhatti@gmail.com> Date: Wed May 9 01:50:33 2018 -0400 Remove default SMS UI from settings commit 1ce79ea756259268c4d2fcd8acbee3101fdbe019 Author: Moez Bhatti <moez.bhatti@gmail.com> Date: Wed May 9 01:45:33 2018 -0400 Remove SetupActivity, perform setup in MainActivity commit ccad342d2ab8a5346d63dab273ba9cadb2fa62c0 Author: Moez Bhatti <moez.bhatti@gmail.com> Date: Mon May 7 18:02:26 2018 -0400 Don't query ContentProvider without appropriate permission commit 527be2e5331ba0cbfd6f3375c12378105d282b0c Author: Moez Bhatti <moez.bhatti@gmail.com> Date: Mon May 7 17:12:00 2018 -0400 Show non-blocking UI in MainActivity while syncing
This commit is contained in:
@@ -21,14 +21,23 @@ package manager
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
import android.provider.Telephony
|
||||
import android.support.v4.content.ContextCompat
|
||||
import javax.inject.Inject
|
||||
|
||||
class PermissionManagerImpl @Inject constructor(private val context: Context) : PermissionManager {
|
||||
|
||||
override fun hasSmsAndContacts(): Boolean {
|
||||
return ContextCompat.checkSelfPermission(context, Manifest.permission.READ_SMS) == PackageManager.PERMISSION_GRANTED &&
|
||||
ContextCompat.checkSelfPermission(context, Manifest.permission.READ_CONTACTS) == PackageManager.PERMISSION_GRANTED
|
||||
override fun isDefaultSms(): Boolean {
|
||||
return Telephony.Sms.getDefaultSmsPackage(context) == context.packageName
|
||||
}
|
||||
|
||||
override fun hasSmsAndContacts(): Boolean {
|
||||
return hasSms() && hasContacts()
|
||||
}
|
||||
|
||||
override fun hasSms(): Boolean = ContextCompat.checkSelfPermission(context, Manifest.permission.READ_SMS) == PackageManager.PERMISSION_GRANTED
|
||||
|
||||
override fun hasContacts(): Boolean = ContextCompat.checkSelfPermission(context, Manifest.permission.READ_CONTACTS) == PackageManager.PERMISSION_GRANTED
|
||||
|
||||
|
||||
}
|
||||
@@ -21,11 +21,15 @@ package mapper
|
||||
import android.content.Context
|
||||
import android.database.Cursor
|
||||
import android.provider.ContactsContract.CommonDataKinds.Phone.*
|
||||
import manager.PermissionManager
|
||||
import model.Contact
|
||||
import model.PhoneNumber
|
||||
import javax.inject.Inject
|
||||
|
||||
class CursorToContactImpl @Inject constructor(private val context: Context) : CursorToContact {
|
||||
class CursorToContactImpl @Inject constructor(
|
||||
private val context: Context,
|
||||
private val permissionManager: PermissionManager
|
||||
) : CursorToContact {
|
||||
|
||||
companion object {
|
||||
val URI = CONTENT_URI
|
||||
@@ -48,7 +52,10 @@ class CursorToContactImpl @Inject constructor(private val context: Context) : Cu
|
||||
}
|
||||
|
||||
override fun getContactsCursor(): Cursor? {
|
||||
return context.contentResolver.query(URI, PROJECTION, null, null, null)
|
||||
return when (permissionManager.hasContacts()) {
|
||||
true -> context.contentResolver.query(URI, PROJECTION, null, null, null)
|
||||
false -> null
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,11 +22,15 @@ import android.content.Context
|
||||
import android.database.Cursor
|
||||
import android.net.Uri
|
||||
import android.provider.Telephony.Threads
|
||||
import manager.PermissionManager
|
||||
import model.Conversation
|
||||
import model.Recipient
|
||||
import javax.inject.Inject
|
||||
|
||||
class CursorToConversationImpl @Inject constructor(private val context: Context) : CursorToConversation {
|
||||
class CursorToConversationImpl @Inject constructor(
|
||||
private val context: Context,
|
||||
private val permissionManager: PermissionManager
|
||||
) : CursorToConversation {
|
||||
|
||||
companion object {
|
||||
val URI: Uri = Uri.parse("content://mms-sms/conversations?simple=true")
|
||||
@@ -62,9 +66,13 @@ class CursorToConversationImpl @Inject constructor(private val context: Context)
|
||||
}
|
||||
|
||||
override fun getConversationsCursor(lastSync: Long): Cursor? {
|
||||
return context.contentResolver.query(URI, PROJECTION,
|
||||
"date > $lastSync", null,
|
||||
"date desc")
|
||||
return when (permissionManager.hasSms()) {
|
||||
true -> context.contentResolver.query(URI, PROJECTION,
|
||||
"date > $lastSync", null,
|
||||
"date desc")
|
||||
|
||||
false -> null
|
||||
}
|
||||
}
|
||||
|
||||
override fun getConversationCursor(threadId: Long): Cursor? {
|
||||
|
||||
@@ -24,14 +24,16 @@ import android.net.Uri
|
||||
import android.provider.Telephony.*
|
||||
import com.google.android.mms.pdu_alt.PduHeaders
|
||||
import manager.KeyManager
|
||||
import manager.PermissionManager
|
||||
import model.Message
|
||||
import util.extensions.map
|
||||
import javax.inject.Inject
|
||||
|
||||
class CursorToMessageImpl @Inject constructor(
|
||||
private val context: Context,
|
||||
private val cursorToPart: CursorToPart,
|
||||
private val keys: KeyManager,
|
||||
private val cursorToPart: CursorToPart
|
||||
private val permissionManager: PermissionManager
|
||||
) : CursorToMessage {
|
||||
|
||||
companion object {
|
||||
@@ -120,7 +122,10 @@ class CursorToMessageImpl @Inject constructor(
|
||||
}
|
||||
|
||||
override fun getMessagesCursor(): Cursor? {
|
||||
return context.contentResolver.query(URI, PROJECTION, null, null, "normalized_date desc")
|
||||
return when (permissionManager.hasSms()) {
|
||||
true -> context.contentResolver.query(URI, PROJECTION, null, null, "normalized_date desc")
|
||||
false -> null
|
||||
}
|
||||
}
|
||||
|
||||
override fun getMessageCursor(id: Long): Cursor? {
|
||||
|
||||
@@ -21,10 +21,14 @@ package mapper
|
||||
import android.content.Context
|
||||
import android.database.Cursor
|
||||
import android.net.Uri
|
||||
import manager.PermissionManager
|
||||
import model.Recipient
|
||||
import javax.inject.Inject
|
||||
|
||||
class CursorToRecipientImpl @Inject constructor(private val context: Context) : CursorToRecipient {
|
||||
class CursorToRecipientImpl @Inject constructor(
|
||||
private val context: Context,
|
||||
private val permissionManager: PermissionManager
|
||||
) : CursorToRecipient {
|
||||
|
||||
companion object {
|
||||
val URI = Uri.parse("content://mms-sms/canonical-addresses")
|
||||
@@ -40,7 +44,10 @@ class CursorToRecipientImpl @Inject constructor(private val context: Context) :
|
||||
}
|
||||
|
||||
override fun getRecipientCursor(): Cursor? {
|
||||
return context.contentResolver.query(URI, null, null, null, null)
|
||||
return when (permissionManager.hasSms()) {
|
||||
true -> context.contentResolver.query(URI, null, null, null, null)
|
||||
false -> null
|
||||
}
|
||||
}
|
||||
|
||||
override fun getRecipientCursor(id: Long): Cursor? {
|
||||
|
||||
@@ -24,6 +24,8 @@ import android.net.Uri
|
||||
import android.provider.Telephony
|
||||
import android.telephony.PhoneNumberUtils
|
||||
import com.f2prateek.rx.preferences2.RxSharedPreferences
|
||||
import io.reactivex.subjects.BehaviorSubject
|
||||
import io.reactivex.subjects.Subject
|
||||
import io.realm.Realm
|
||||
import mapper.CursorToContact
|
||||
import mapper.CursorToConversation
|
||||
@@ -34,10 +36,8 @@ import model.Conversation
|
||||
import model.Message
|
||||
import model.MmsPart
|
||||
import model.Recipient
|
||||
import model.SyncLog
|
||||
import util.extensions.insertOrUpdate
|
||||
import util.extensions.map
|
||||
import util.extensions.mapWhile
|
||||
import util.tryOrNull
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
@@ -53,58 +53,41 @@ class SyncRepositoryImpl @Inject constructor(
|
||||
private val rxPrefs: RxSharedPreferences
|
||||
) : SyncRepository {
|
||||
|
||||
sealed class Status {
|
||||
class Idle : Status()
|
||||
class Running : Status()
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds data that should be persisted across full syncs
|
||||
*/
|
||||
private data class PersistedData(val id: Long, val archived: Boolean, val blocked: Boolean)
|
||||
|
||||
private var status: Status = Status.Idle()
|
||||
override val syncProgress: Subject<SyncRepository.SyncProgress> = BehaviorSubject.createDefault(SyncRepository.SyncProgress.Idle())
|
||||
|
||||
override fun syncMessages(fullSync: Boolean) {
|
||||
override fun syncMessages() {
|
||||
|
||||
// If the sync is already running, don't try to do another one
|
||||
if (status is Status.Running) return
|
||||
status = Status.Running()
|
||||
if (syncProgress.blockingFirst() is SyncRepository.SyncProgress.Running) return
|
||||
syncProgress.onNext(SyncRepository.SyncProgress.Running(0f))
|
||||
|
||||
val realm = Realm.getDefaultInstance()
|
||||
realm.beginTransaction()
|
||||
|
||||
var persistedData: List<PersistedData> = listOf()
|
||||
var persistedData = realm.where(Conversation::class.java)
|
||||
.beginGroup()
|
||||
.equalTo("archived", true)
|
||||
.or()
|
||||
.equalTo("blocked", true)
|
||||
.endGroup()
|
||||
.findAll()
|
||||
.map { PersistedData(it.id, it.archived, it.blocked) }
|
||||
|
||||
if (fullSync) {
|
||||
persistedData += realm.where(Conversation::class.java)
|
||||
.beginGroup()
|
||||
.equalTo("archived", true)
|
||||
.or()
|
||||
.equalTo("blocked", true)
|
||||
.endGroup()
|
||||
.findAll()
|
||||
.map { conversation ->
|
||||
PersistedData(conversation.id, conversation.archived, conversation.blocked)
|
||||
}
|
||||
|
||||
realm.delete(Conversation::class.java)
|
||||
realm.delete(Message::class.java)
|
||||
realm.delete(MmsPart::class.java)
|
||||
realm.delete(Recipient::class.java)
|
||||
realm.delete(SyncLog::class.java)
|
||||
}
|
||||
|
||||
val lastSync = realm.where(SyncLog::class.java)?.max("date")?.toLong() ?: 0
|
||||
realm.insert(SyncLog())
|
||||
realm.delete(Conversation::class.java)
|
||||
realm.delete(Message::class.java)
|
||||
realm.delete(MmsPart::class.java)
|
||||
realm.delete(Recipient::class.java)
|
||||
|
||||
|
||||
// Sync messages
|
||||
cursorToMessage.getMessagesCursor()?.use { messageCursor ->
|
||||
val messageColumns = CursorToMessage.MessageColumns(messageCursor)
|
||||
val messages = messageCursor.mapWhile(
|
||||
{ cursor -> cursorToMessage.map(Pair(cursor, messageColumns)) },
|
||||
{ message -> message.date > lastSync })
|
||||
val messages = messageCursor.map { cursor -> cursorToMessage.map(Pair(cursor, messageColumns)) }
|
||||
realm.insertOrUpdate(messages)
|
||||
}
|
||||
|
||||
@@ -144,7 +127,7 @@ class SyncRepositoryImpl @Inject constructor(
|
||||
|
||||
syncContacts()
|
||||
|
||||
status = Status.Idle()
|
||||
syncProgress.onNext(SyncRepository.SyncProgress.Idle())
|
||||
}
|
||||
|
||||
override fun syncMessage(uri: Uri): Message? {
|
||||
@@ -204,26 +187,27 @@ class SyncRepositoryImpl @Inject constructor(
|
||||
}
|
||||
} ?: listOf()
|
||||
|
||||
val realm = Realm.getDefaultInstance()
|
||||
val recipients = realm.where(Recipient::class.java).findAll()
|
||||
Realm.getDefaultInstance()?.use { realm ->
|
||||
val recipients = realm.where(Recipient::class.java).findAll()
|
||||
|
||||
realm.executeTransaction {
|
||||
realm.delete(Contact::class.java)
|
||||
realm.executeTransaction {
|
||||
realm.delete(Contact::class.java)
|
||||
|
||||
contacts = realm.copyToRealm(contacts)
|
||||
contacts = realm.copyToRealm(contacts)
|
||||
|
||||
// Update all the recipients with the new contacts
|
||||
val updatedRecipients = recipients.map { recipient ->
|
||||
recipient.apply {
|
||||
contact = contacts.firstOrNull {
|
||||
it.numbers.any { PhoneNumberUtils.compare(recipient.address, it.address) }
|
||||
// Update all the recipients with the new contacts
|
||||
val updatedRecipients = recipients.map { recipient ->
|
||||
recipient.apply {
|
||||
contact = contacts.firstOrNull {
|
||||
it.numbers.any { PhoneNumberUtils.compare(recipient.address, it.address) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
realm.insertOrUpdate(updatedRecipients)
|
||||
}
|
||||
|
||||
realm.insertOrUpdate(updatedRecipients)
|
||||
}
|
||||
realm.close()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,7 +48,6 @@ class Preferences @Inject constructor(private val rxPrefs: RxSharedPreferences)
|
||||
const val SEND_DELAY_LONG = 3
|
||||
}
|
||||
|
||||
val defaultSms = rxPrefs.getBoolean("defaultSms", false)
|
||||
val night = rxPrefs.getBoolean("night", false)
|
||||
val nightMode = rxPrefs.getInteger("nightModeSummary", NIGHT_MODE_OFF)
|
||||
val nightStart = rxPrefs.getString("nightStart", "6:00 PM")
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
*
|
||||
* This file is part of QKSMS.
|
||||
*
|
||||
* QKSMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* QKSMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package interactor
|
||||
|
||||
import io.reactivex.Flowable
|
||||
import manager.PermissionManager
|
||||
import repository.SyncRepository
|
||||
import timber.log.Timber
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Inject
|
||||
|
||||
open class PartialSync @Inject constructor(
|
||||
private val syncManager: SyncRepository,
|
||||
private val permissions: PermissionManager
|
||||
) : Interactor<Unit>() {
|
||||
|
||||
override fun buildObservable(params: Unit): Flowable<Long> {
|
||||
return Flowable.just(System.currentTimeMillis())
|
||||
.skipWhile { !permissions.hasSmsAndContacts() }
|
||||
.doOnNext { syncManager.syncMessages() }
|
||||
.map { startTime -> System.currentTimeMillis() - startTime }
|
||||
.map { elapsed -> TimeUnit.MILLISECONDS.toSeconds(elapsed) }
|
||||
.doOnNext { seconds -> Timber.v("Completed sync in $seconds seconds") }
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -25,7 +25,7 @@ import timber.log.Timber
|
||||
import java.util.concurrent.TimeUnit
|
||||
import javax.inject.Inject
|
||||
|
||||
class FullSync @Inject constructor(
|
||||
class SyncMessages @Inject constructor(
|
||||
private val syncManager: SyncRepository,
|
||||
private val keys: KeyManager
|
||||
) : Interactor<Unit>() {
|
||||
@@ -33,7 +33,7 @@ class FullSync @Inject constructor(
|
||||
override fun buildObservable(params: Unit): Flowable<Long> {
|
||||
return Flowable.just(System.currentTimeMillis())
|
||||
.doOnNext { keys.reset() }
|
||||
.doOnNext { syncManager.syncMessages(true) }
|
||||
.doOnNext { syncManager.syncMessages() }
|
||||
.map { startTime -> System.currentTimeMillis() - startTime }
|
||||
.map { elapsed -> TimeUnit.MILLISECONDS.toSeconds(elapsed) }
|
||||
.doOnNext { seconds -> Timber.v("Completed sync in $seconds seconds") }
|
||||
@@ -20,6 +20,12 @@ package manager
|
||||
|
||||
interface PermissionManager {
|
||||
|
||||
fun isDefaultSms(): Boolean
|
||||
|
||||
fun hasSmsAndContacts(): Boolean
|
||||
|
||||
fun hasSms(): Boolean
|
||||
|
||||
fun hasContacts(): Boolean
|
||||
|
||||
}
|
||||
@@ -19,11 +19,19 @@
|
||||
package repository
|
||||
|
||||
import android.net.Uri
|
||||
import io.reactivex.Observable
|
||||
import model.Message
|
||||
|
||||
interface SyncRepository {
|
||||
|
||||
fun syncMessages(fullSync: Boolean = false)
|
||||
sealed class SyncProgress {
|
||||
class Idle : SyncProgress()
|
||||
class Running(progress: Float) : SyncProgress()
|
||||
}
|
||||
|
||||
val syncProgress: Observable<SyncProgress>
|
||||
|
||||
fun syncMessages()
|
||||
|
||||
fun syncMessage(uri: Uri): Message?
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="feature.settings.SettingsActivity" />
|
||||
<activity android:name="feature.setup.SetupActivity" />
|
||||
<activity android:name="feature.themepicker.ThemePickerActivity" />
|
||||
<activity android:name="feature.plus.PlusActivity" />
|
||||
<activity
|
||||
|
||||
@@ -50,8 +50,6 @@ import feature.settings.SettingsActivity
|
||||
import feature.settings.SettingsViewModel
|
||||
import feature.settings.about.AboutActivity
|
||||
import feature.settings.about.AboutViewModel
|
||||
import feature.setup.SetupActivity
|
||||
import feature.setup.SetupViewModel
|
||||
import feature.themepicker.ThemePickerActivity
|
||||
import feature.themepicker.ThemePickerViewModel
|
||||
import manager.NotificationManager
|
||||
@@ -75,11 +73,6 @@ class Navigator @Inject constructor(private val context: Context, private val no
|
||||
}
|
||||
}
|
||||
|
||||
fun showSetupActivity() {
|
||||
val intent = Intent(context, SetupActivity::class.java)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
fun showQksmsPlusActivity() {
|
||||
val intent = Intent(context, PlusActivity::class.java)
|
||||
startActivity(intent)
|
||||
@@ -262,7 +255,6 @@ class Navigator @Inject constructor(private val context: Context, private val no
|
||||
return when (modelClass) {
|
||||
MainViewModel::class.java -> MainViewModel()
|
||||
PlusViewModel::class.java -> PlusViewModel()
|
||||
SetupViewModel::class.java -> SetupViewModel()
|
||||
AboutViewModel::class.java -> AboutViewModel()
|
||||
ComposeViewModel::class.java -> ComposeViewModel(intent)
|
||||
ConversationInfoViewModel::class.java -> ConversationInfoViewModel(intent)
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
*/
|
||||
package feature.main
|
||||
|
||||
import android.Manifest
|
||||
import android.app.AlertDialog
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.graphics.drawable.StateListDrawable
|
||||
import android.os.Bundle
|
||||
import android.support.design.widget.Snackbar
|
||||
import android.support.v4.app.ActivityCompat
|
||||
import android.support.v7.app.ActionBarDrawerToggle
|
||||
import android.support.v7.widget.LinearLayoutManager
|
||||
import android.support.v7.widget.helper.ItemTouchHelper
|
||||
@@ -53,6 +55,7 @@ import io.reactivex.subjects.PublishSubject
|
||||
import io.reactivex.subjects.Subject
|
||||
import kotlinx.android.synthetic.main.drawer_view.*
|
||||
import kotlinx.android.synthetic.main.main_activity.*
|
||||
import repository.SyncRepository
|
||||
import javax.inject.Inject
|
||||
|
||||
class MainActivity : QkThemedActivity<MainViewModel>(), MainView {
|
||||
@@ -62,6 +65,7 @@ class MainActivity : QkThemedActivity<MainViewModel>(), MainView {
|
||||
@Inject lateinit var itemTouchCallback: ConversationItemTouchCallback
|
||||
|
||||
override val viewModelClass = MainViewModel::class
|
||||
override val activityResumedIntent: Subject<Unit> = PublishSubject.create()
|
||||
override val queryChangedIntent by lazy { toolbarSearch.textChanges() }
|
||||
override val composeIntent by lazy { compose.clicks() }
|
||||
override val drawerOpenIntent: Observable<Boolean> by lazy {
|
||||
@@ -86,6 +90,7 @@ class MainActivity : QkThemedActivity<MainViewModel>(), MainView {
|
||||
override val confirmDeleteIntent: Subject<Unit> = PublishSubject.create()
|
||||
override val swipeConversationIntent by lazy { itemTouchCallback.swipes }
|
||||
override val undoSwipeConversationIntent: Subject<Unit> = PublishSubject.create()
|
||||
override val snackbarButtonIntent by lazy { snackbarButton.clicks() }
|
||||
override val backPressedIntent: Subject<Unit> = PublishSubject.create()
|
||||
|
||||
private val toggle by lazy { ActionBarDrawerToggle(this, drawerLayout, toolbar, 0, 0) }
|
||||
@@ -205,8 +210,6 @@ class MainActivity : QkThemedActivity<MainViewModel>(), MainView {
|
||||
toolbar.menu.findItem(R.id.block)?.isVisible = selectedConversations != 0
|
||||
toolbar.menu.findItem(R.id.delete)?.isVisible = selectedConversations != 0
|
||||
|
||||
syncing.setVisible(state.syncing)
|
||||
synced.setVisible(!state.syncing)
|
||||
rateLayout.setVisible(state.showRating)
|
||||
|
||||
compose.setVisible(state.page is Inbox || state.page is Archived)
|
||||
@@ -255,12 +258,45 @@ class MainActivity : QkThemedActivity<MainViewModel>(), MainView {
|
||||
|
||||
if (drawerLayout.isDrawerOpen(Gravity.START) && !state.drawerOpen) drawerLayout.closeDrawer(Gravity.START)
|
||||
else if (!drawerLayout.isDrawerVisible(Gravity.START) && state.drawerOpen) drawerLayout.openDrawer(Gravity.START)
|
||||
|
||||
syncing.setVisible(state.syncing is SyncRepository.SyncProgress.Running)
|
||||
snackbar.setVisible(state.syncing is SyncRepository.SyncProgress.Idle
|
||||
&& !state.defaultSms || !state.smsPermission || !state.contactPermission)
|
||||
|
||||
when {
|
||||
!state.smsPermission -> {
|
||||
snackbarTitle.setText(R.string.main_permission_required)
|
||||
snackbarMessage.setText(R.string.main_permission_sms)
|
||||
snackbarButton.setText(R.string.main_permission_allow)
|
||||
}
|
||||
|
||||
!state.defaultSms -> {
|
||||
snackbarTitle.setText(R.string.main_default_sms_title)
|
||||
snackbarMessage.setText(R.string.main_default_sms_message)
|
||||
snackbarButton.setText(R.string.main_default_sms_change)
|
||||
}
|
||||
|
||||
!state.contactPermission -> {
|
||||
snackbarTitle.setText(R.string.main_permission_required)
|
||||
snackbarMessage.setText(R.string.main_permission_contacts)
|
||||
snackbarButton.setText(R.string.main_permission_allow)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
activityResumedIntent.onNext(Unit)
|
||||
}
|
||||
|
||||
override fun showBackButton(show: Boolean) {
|
||||
toggle.onDrawerSlide(drawer, if (show) 1f else 0f)
|
||||
}
|
||||
|
||||
override fun requestPermissions() {
|
||||
ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.READ_CONTACTS, Manifest.permission.READ_SMS), 0)
|
||||
}
|
||||
|
||||
override fun clearSearch() {
|
||||
dismissKeyboard()
|
||||
toolbarSearch.text = null
|
||||
|
||||
@@ -20,13 +20,17 @@ package feature.main
|
||||
|
||||
import io.reactivex.Flowable
|
||||
import model.Conversation
|
||||
import repository.SyncRepository
|
||||
|
||||
data class MainState(
|
||||
val hasError: Boolean = false,
|
||||
val page: MainPage = Inbox(),
|
||||
val drawerOpen: Boolean = false,
|
||||
val syncing: Boolean = false,
|
||||
val showRating: Boolean = false
|
||||
val showRating: Boolean = false,
|
||||
val syncing: SyncRepository.SyncProgress = SyncRepository.SyncProgress.Idle(),
|
||||
val defaultSms: Boolean = false,
|
||||
val smsPermission: Boolean = false,
|
||||
val contactPermission: Boolean = false
|
||||
)
|
||||
|
||||
sealed class MainPage
|
||||
|
||||
@@ -23,6 +23,7 @@ import io.reactivex.Observable
|
||||
|
||||
interface MainView : QkView<MainState> {
|
||||
|
||||
val activityResumedIntent: Observable<*>
|
||||
val queryChangedIntent: Observable<CharSequence>
|
||||
val composeIntent: Observable<Unit>
|
||||
val drawerOpenIntent: Observable<Boolean>
|
||||
@@ -35,8 +36,10 @@ interface MainView : QkView<MainState> {
|
||||
val confirmDeleteIntent: Observable<Unit>
|
||||
val swipeConversationIntent: Observable<Long>
|
||||
val undoSwipeConversationIntent: Observable<Unit>
|
||||
val snackbarButtonIntent: Observable<Unit>
|
||||
val backPressedIntent: Observable<Unit>
|
||||
|
||||
fun requestPermissions()
|
||||
fun clearSearch()
|
||||
fun clearSelection()
|
||||
fun showDeleteDialog()
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
*/
|
||||
package feature.main
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
import android.provider.Telephony
|
||||
import android.support.v4.content.ContextCompat
|
||||
import com.moez.QKSMS.R
|
||||
import com.uber.autodispose.android.lifecycle.scope
|
||||
import com.uber.autodispose.kotlin.autoDisposable
|
||||
@@ -36,14 +32,15 @@ import interactor.MarkArchived
|
||||
import interactor.MarkBlocked
|
||||
import interactor.MarkUnarchived
|
||||
import interactor.MigratePreferences
|
||||
import interactor.PartialSync
|
||||
import interactor.SyncMessages
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.rxkotlin.Observables
|
||||
import io.reactivex.rxkotlin.plusAssign
|
||||
import io.reactivex.rxkotlin.withLatestFrom
|
||||
import io.realm.Realm
|
||||
import manager.PermissionManager
|
||||
import manager.RatingManager
|
||||
import model.SyncLog
|
||||
import repository.MessageRepository
|
||||
import repository.SyncRepository
|
||||
import util.Preferences
|
||||
import util.extensions.removeAccents
|
||||
import java.util.concurrent.TimeUnit
|
||||
@@ -61,9 +58,11 @@ class MainViewModel : QkViewModel<MainView, MainState>(MainState()) {
|
||||
@Inject lateinit var markBlocked: MarkBlocked
|
||||
@Inject lateinit var migratePreferences: MigratePreferences
|
||||
@Inject lateinit var navigator: Navigator
|
||||
@Inject lateinit var partialSync: PartialSync
|
||||
@Inject lateinit var permissionManager: PermissionManager
|
||||
@Inject lateinit var prefs: Preferences
|
||||
@Inject lateinit var ratingManager: RatingManager
|
||||
@Inject lateinit var syncMessages: SyncMessages
|
||||
@Inject lateinit var syncRepository: SyncRepository
|
||||
|
||||
private val conversations by lazy { messageRepo.getConversations() }
|
||||
|
||||
@@ -78,37 +77,22 @@ class MainViewModel : QkViewModel<MainView, MainState>(MainState()) {
|
||||
disposables += markArchived
|
||||
disposables += markUnarchived
|
||||
disposables += migratePreferences
|
||||
disposables += partialSync
|
||||
disposables += syncMessages
|
||||
|
||||
// If it's the first sync, reflect that in the ViewState
|
||||
disposables += Realm.getDefaultInstance()
|
||||
.where(SyncLog::class.java)
|
||||
.findAll()
|
||||
.asFlowable()
|
||||
.filter { it.isLoaded }
|
||||
.map { it.size == 0 }
|
||||
.doOnNext { if (it) partialSync.execute(Unit) }
|
||||
// Show the syncing UI
|
||||
disposables += syncRepository.syncProgress
|
||||
.distinctUntilChanged()
|
||||
.subscribe { syncing -> newState { it.copy(syncing = syncing) } }
|
||||
|
||||
|
||||
// Show the rating UI
|
||||
disposables += ratingManager.shouldShowRating
|
||||
.subscribe { show -> newState { it.copy(showRating = show) } }
|
||||
|
||||
// Migrate the preferences from 2.7.3 if necessary
|
||||
|
||||
// Migrate the preferences from 2.7.3
|
||||
migratePreferences.execute(Unit)
|
||||
|
||||
val isNotDefaultSms = Telephony.Sms.getDefaultSmsPackage(context) != context.packageName
|
||||
val hasSmsPermission = ContextCompat.checkSelfPermission(context, Manifest.permission.READ_SMS) == PackageManager.PERMISSION_GRANTED
|
||||
val hasContactPermission = ContextCompat.checkSelfPermission(context, Manifest.permission.READ_CONTACTS) == PackageManager.PERMISSION_GRANTED
|
||||
|
||||
if (isNotDefaultSms) {
|
||||
partialSync.execute(Unit)
|
||||
}
|
||||
|
||||
if (isNotDefaultSms || !hasSmsPermission || !hasContactPermission) {
|
||||
navigator.showSetupActivity()
|
||||
}
|
||||
|
||||
ratingManager.addSession()
|
||||
markAllSeen.execute(Unit)
|
||||
}
|
||||
@@ -116,14 +100,43 @@ class MainViewModel : QkViewModel<MainView, MainState>(MainState()) {
|
||||
override fun bindView(view: MainView) {
|
||||
super.bindView(view)
|
||||
|
||||
if (!permissionManager.hasSmsAndContacts()) {
|
||||
view.requestPermissions()
|
||||
}
|
||||
|
||||
// If the default SMS state or permission states change, update the ViewState
|
||||
Observables.combineLatest(
|
||||
view.activityResumedIntent.map { permissionManager.isDefaultSms() }.distinctUntilChanged(),
|
||||
view.activityResumedIntent.map { permissionManager.hasSms() }.distinctUntilChanged(),
|
||||
view.activityResumedIntent.map { permissionManager.hasContacts() }.distinctUntilChanged(),
|
||||
{ defaultSms, smsPermission, contactPermission ->
|
||||
newState { it.copy(defaultSms = defaultSms, smsPermission = smsPermission, contactPermission = contactPermission) }
|
||||
})
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe()
|
||||
|
||||
// If the SMS permission state changes from false to true, sync messages
|
||||
view.activityResumedIntent
|
||||
.map { permissionManager.hasSms() }
|
||||
.distinctUntilChanged()
|
||||
.skip(1)
|
||||
.filter { hasSms -> hasSms }
|
||||
.take(1)
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe {
|
||||
syncMessages.execute(Unit)
|
||||
if (!permissionManager.isDefaultSms()) {
|
||||
navigator.showDefaultSmsDialog()
|
||||
}
|
||||
}
|
||||
|
||||
view.queryChangedIntent
|
||||
.debounce(200, TimeUnit.MILLISECONDS)
|
||||
.map { query -> query.removeAccents() }
|
||||
.withLatestFrom(state, { query, state ->
|
||||
if (state.page is Inbox) {
|
||||
val filteredConversations = if (query.isEmpty()) conversations
|
||||
else conversations
|
||||
.map { conversations -> conversations.filter { conversationFilter.filter(it, query) } }
|
||||
else conversations.map { conversations -> conversations.filter { conversationFilter.filter(it, query) } }
|
||||
|
||||
val page = state.page.copy(showClearButton = query.isNotEmpty(), data = filteredConversations)
|
||||
newState { it.copy(page = page) }
|
||||
@@ -260,6 +273,17 @@ class MainViewModel : QkViewModel<MainView, MainState>(MainState()) {
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { threadId -> markUnarchived.execute(listOf(threadId)) }
|
||||
|
||||
view.snackbarButtonIntent
|
||||
.withLatestFrom(state, { _, state ->
|
||||
when {
|
||||
!state.smsPermission -> view.requestPermissions()
|
||||
!state.defaultSms -> navigator.showDefaultSmsDialog()
|
||||
!state.contactPermission -> view.requestPermissions()
|
||||
}
|
||||
})
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe()
|
||||
|
||||
view.backPressedIntent
|
||||
.withLatestFrom(state, { _, state ->
|
||||
when {
|
||||
|
||||
@@ -105,11 +105,6 @@ class SettingsActivity : QkThemedActivity<SettingsViewModel>(), SettingsView {
|
||||
if (progressDialog.isShowing && !state.syncing) progressDialog.dismiss()
|
||||
else if (!progressDialog.isShowing && state.syncing) progressDialog.show()
|
||||
|
||||
defaultSms.summary = getString(when (state.isDefaultSmsApp) {
|
||||
true -> R.string.settings_default_sms_summary_true
|
||||
else -> R.string.settings_default_sms_summary_false
|
||||
})
|
||||
|
||||
themePreview.setBackgroundTint(state.theme)
|
||||
night.summary = state.nightModeSummary
|
||||
nightModeDialog.adapter.selectedItem = state.nightModeId
|
||||
|
||||
@@ -22,7 +22,6 @@ import util.Preferences
|
||||
|
||||
data class SettingsState(
|
||||
val syncing: Boolean = false,
|
||||
val isDefaultSmsApp: Boolean = false,
|
||||
val theme: Int = 0,
|
||||
val nightModeSummary: String = "",
|
||||
val nightModeId: Int = Preferences.NIGHT_MODE_OFF,
|
||||
|
||||
@@ -29,7 +29,7 @@ import common.util.Colors
|
||||
import common.util.DateFormatter
|
||||
import common.util.NightModeManager
|
||||
import injection.appComponent
|
||||
import interactor.FullSync
|
||||
import interactor.SyncMessages
|
||||
import io.reactivex.rxkotlin.plusAssign
|
||||
import io.reactivex.rxkotlin.withLatestFrom
|
||||
import timber.log.Timber
|
||||
@@ -46,17 +46,11 @@ class SettingsViewModel : QkViewModel<SettingsView, SettingsState>(SettingsState
|
||||
@Inject lateinit var navigator: Navigator
|
||||
@Inject lateinit var nightModeManager: NightModeManager
|
||||
@Inject lateinit var prefs: Preferences
|
||||
@Inject lateinit var fullSync: FullSync
|
||||
@Inject lateinit var syncMessages: SyncMessages
|
||||
|
||||
init {
|
||||
appComponent.inject(this)
|
||||
|
||||
disposables += prefs.defaultSms
|
||||
.asObservable()
|
||||
.subscribe { isDefaultSmsApp ->
|
||||
newState { it.copy(isDefaultSmsApp = isDefaultSmsApp) }
|
||||
}
|
||||
|
||||
disposables += colors.theme
|
||||
.subscribe { color -> newState { it.copy(theme = color) } }
|
||||
|
||||
@@ -108,7 +102,7 @@ class SettingsViewModel : QkViewModel<SettingsView, SettingsState>(SettingsState
|
||||
newState { it.copy(maxMmsSizeSummary = mmsSizeLabels[index], maxMmsSizeId = maxMmsSize) }
|
||||
}
|
||||
|
||||
disposables += fullSync
|
||||
disposables += syncMessages
|
||||
}
|
||||
|
||||
override fun bindView(view: SettingsView) {
|
||||
@@ -120,8 +114,6 @@ class SettingsViewModel : QkViewModel<SettingsView, SettingsState>(SettingsState
|
||||
Timber.v("Preference click: ${context.resources.getResourceName(it.id)}")
|
||||
|
||||
when (it.id) {
|
||||
R.id.defaultSms -> navigator.showDefaultSmsDialog()
|
||||
|
||||
R.id.theme -> navigator.showThemePicker()
|
||||
|
||||
R.id.night -> view.showNightModeDialog()
|
||||
@@ -158,7 +150,7 @@ class SettingsViewModel : QkViewModel<SettingsView, SettingsState>(SettingsState
|
||||
|
||||
R.id.sync -> {
|
||||
newState { it.copy(syncing = true) }
|
||||
fullSync.execute(Unit, {
|
||||
syncMessages.execute(Unit, {
|
||||
newState { it.copy(syncing = false) }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
*
|
||||
* This file is part of QKSMS.
|
||||
*
|
||||
* QKSMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* QKSMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package feature.setup
|
||||
|
||||
import android.Manifest
|
||||
import android.os.Bundle
|
||||
import android.support.v4.app.ActivityCompat
|
||||
import com.jakewharton.rxbinding2.view.clicks
|
||||
import com.moez.QKSMS.R
|
||||
import com.uber.autodispose.android.lifecycle.scope
|
||||
import com.uber.autodispose.kotlin.autoDisposable
|
||||
import injection.appComponent
|
||||
import io.reactivex.subjects.PublishSubject
|
||||
import io.reactivex.subjects.Subject
|
||||
import kotlinx.android.synthetic.main.setup_activity.*
|
||||
import common.Navigator
|
||||
import common.base.QkThemedActivity
|
||||
import javax.inject.Inject
|
||||
|
||||
class SetupActivity : QkThemedActivity<SetupViewModel>(), SetupView {
|
||||
|
||||
override val viewModelClass = SetupViewModel::class
|
||||
override val activityResumedIntent: Subject<Unit> = PublishSubject.create()
|
||||
override val skipIntent by lazy { skip.clicks() }
|
||||
override val nextIntent by lazy { next.clicks() }
|
||||
|
||||
@Inject lateinit var navigator: Navigator
|
||||
|
||||
init {
|
||||
appComponent.inject(this)
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.setup_activity)
|
||||
viewModel.bindView(this)
|
||||
|
||||
colors.background
|
||||
.autoDisposable(scope())
|
||||
.subscribe { color -> window.decorView.setBackgroundColor(color) }
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
activityResumedIntent.onNext(Unit)
|
||||
}
|
||||
|
||||
override fun render(state: SetupState) {
|
||||
}
|
||||
|
||||
override fun requestDefaultSms() {
|
||||
navigator.showDefaultSmsDialog()
|
||||
}
|
||||
|
||||
override fun requestPermissions() {
|
||||
ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.READ_CONTACTS, Manifest.permission.READ_SMS), 0)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
*
|
||||
* This file is part of QKSMS.
|
||||
*
|
||||
* QKSMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* QKSMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package feature.setup
|
||||
|
||||
class SetupState
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
*
|
||||
* This file is part of QKSMS.
|
||||
*
|
||||
* QKSMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* QKSMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package feature.setup
|
||||
|
||||
import io.reactivex.Observable
|
||||
import common.base.QkView
|
||||
import feature.setup.SetupState
|
||||
|
||||
interface SetupView : QkView<SetupState> {
|
||||
|
||||
val activityResumedIntent: Observable<*>
|
||||
val skipIntent: Observable<*>
|
||||
val nextIntent: Observable<*>
|
||||
|
||||
fun requestDefaultSms()
|
||||
fun requestPermissions()
|
||||
fun finish()
|
||||
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
*
|
||||
* This file is part of QKSMS.
|
||||
*
|
||||
* QKSMS is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* QKSMS is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package feature.setup
|
||||
|
||||
import android.content.Context
|
||||
import android.provider.Telephony
|
||||
import com.uber.autodispose.android.lifecycle.scope
|
||||
import com.uber.autodispose.kotlin.autoDisposable
|
||||
import injection.appComponent
|
||||
import manager.PermissionManager
|
||||
import common.base.QkViewModel
|
||||
import feature.setup.SetupState
|
||||
import feature.setup.SetupView
|
||||
import javax.inject.Inject
|
||||
|
||||
class SetupViewModel : QkViewModel<SetupView, SetupState>(SetupState()) {
|
||||
|
||||
@Inject lateinit var context: Context
|
||||
@Inject lateinit var permissions: PermissionManager
|
||||
|
||||
init {
|
||||
appComponent.inject(this)
|
||||
}
|
||||
|
||||
override fun bindView(view: SetupView) {
|
||||
super.bindView(view)
|
||||
|
||||
view.activityResumedIntent
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe {
|
||||
val isDefault = Telephony.Sms.getDefaultSmsPackage(context) == context.packageName
|
||||
|
||||
if (!permissions.hasSmsAndContacts()) view.requestPermissions()
|
||||
else if (isDefault) view.finish()
|
||||
}
|
||||
|
||||
view.skipIntent
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { view.finish() }
|
||||
|
||||
view.nextIntent
|
||||
.autoDisposable(view.scope())
|
||||
.subscribe { view.requestDefaultSms() }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -50,8 +50,6 @@ import feature.settings.SettingsActivity
|
||||
import feature.settings.SettingsViewModel
|
||||
import feature.settings.about.AboutActivity
|
||||
import feature.settings.about.AboutViewModel
|
||||
import feature.setup.SetupActivity
|
||||
import feature.setup.SetupViewModel
|
||||
import feature.themepicker.ThemePickerActivity
|
||||
import feature.themepicker.ThemePickerViewModel
|
||||
import feature.widget.WidgetAdapter
|
||||
@@ -78,7 +76,6 @@ interface AppComponent {
|
||||
fun inject(application: QKApplication)
|
||||
|
||||
fun inject(activity: MainActivity)
|
||||
fun inject(activity: SetupActivity)
|
||||
fun inject(activity: AboutActivity)
|
||||
fun inject(activity: BlockedActivity)
|
||||
fun inject(activity: ComposeActivity)
|
||||
@@ -121,7 +118,6 @@ interface AppComponent {
|
||||
fun inject(view: Separator)
|
||||
|
||||
fun inject(viewModel: MainViewModel)
|
||||
fun inject(viewModel: SetupViewModel)
|
||||
fun inject(viewModel: AboutViewModel)
|
||||
fun inject(viewModel: BlockedViewModel)
|
||||
fun inject(viewModel: ComposeViewModel)
|
||||
|
||||
@@ -25,25 +25,22 @@ import android.os.Build
|
||||
import android.provider.Telephony
|
||||
import android.support.annotation.RequiresApi
|
||||
import injection.appComponent
|
||||
import interactor.SyncMessages
|
||||
import util.Preferences
|
||||
import interactor.PartialSync
|
||||
import javax.inject.Inject
|
||||
|
||||
class DefaultSmsChangedReceiver : BroadcastReceiver() {
|
||||
|
||||
@Inject lateinit var partialSync: PartialSync
|
||||
@Inject lateinit var prefs: Preferences
|
||||
@Inject lateinit var syncMessages: SyncMessages
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
appComponent.inject(this)
|
||||
|
||||
val isDefaultSmsApp = intent.getBooleanExtra(Telephony.Sms.Intents.EXTRA_IS_DEFAULT_SMS_APP, false)
|
||||
prefs.defaultSms.set(isDefaultSmsApp)
|
||||
|
||||
if (isDefaultSmsApp) {
|
||||
if (intent.getBooleanExtra(Telephony.Sms.Intents.EXTRA_IS_DEFAULT_SMS_APP, false)) {
|
||||
val pendingResult = goAsync()
|
||||
partialSync.execute(Unit, { pendingResult.finish() })
|
||||
syncMessages.execute(Unit, { pendingResult.finish() })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
tools:background="@color/white">
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -54,85 +55,44 @@
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
<android.support.constraint.Group
|
||||
android:id="@+id/syncing"
|
||||
<common.widget.QkTextView
|
||||
android:id="@+id/empty"
|
||||
style="@style/TextSecondary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="56dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||
tools:text="Your conversations will appear here"
|
||||
tools:visibility="invisible" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingTop="8dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||
tools:listitem="@layout/conversation_list_item" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/compose"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="syncingProgress,syncingLabel"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/syncingProgress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginStart="32dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/syncingLabel"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="@string/main_fab_cd"
|
||||
android:src="@drawable/ic_add_black_24dp"
|
||||
android:tint="@color/white"
|
||||
app:layout_anchor="@+id/recyclerView"
|
||||
app:layout_anchorGravity="bottom|right|end"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<common.widget.QkTextView
|
||||
android:id="@+id/syncingLabel"
|
||||
style="@style/TextSecondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="32dp"
|
||||
android:layout_marginStart="32dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/main_syncing"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/syncingProgress" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/synced"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar">
|
||||
|
||||
<common.widget.QkTextView
|
||||
android:id="@+id/empty"
|
||||
style="@style/TextSecondary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:padding="56dp"
|
||||
tools:text="Your conversations will appear here"
|
||||
tools:visibility="invisible" />
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingTop="8dp"
|
||||
tools:listitem="@layout/conversation_list_item" />
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/compose"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:layout_margin="16dp"
|
||||
android:contentDescription="@string/main_fab_cd"
|
||||
android:src="@drawable/ic_add_black_24dp"
|
||||
android:tint="@color/white"
|
||||
app:layout_anchor="@+id/recyclerView"
|
||||
app:layout_anchorGravity="bottom|right|end"
|
||||
tools:backgroundTint="@color/tools_theme" />
|
||||
|
||||
</FrameLayout>
|
||||
tools:backgroundTint="@color/tools_theme" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
@@ -143,8 +103,101 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/toolbar" />
|
||||
|
||||
<common.widget.Separator
|
||||
android:id="@+id/bottom"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottomDivider" />
|
||||
|
||||
<android.support.constraint.Barrier
|
||||
android:id="@+id/bottomDivider"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="top"
|
||||
app:constraint_referenced_ids="snackbarTitle, snackbarMessage, syncingLabel, syncingProgress" />
|
||||
|
||||
<android.support.constraint.Group
|
||||
android:id="@+id/snackbar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="snackbarTitle, snackbarMessage, snackbarButton"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<android.support.constraint.Group
|
||||
android:id="@+id/syncing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:constraint_referenced_ids="syncingProgress,syncingLabel"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<common.widget.QkTextView
|
||||
android:id="@+id/snackbarTitle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/snackbarMessage"
|
||||
app:layout_constraintEnd_toStartOf="@id/snackbarButton"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:textColor="primary"
|
||||
app:textSize="primary"
|
||||
tools:text="Love texting again" />
|
||||
|
||||
<common.widget.QkTextView
|
||||
android:id="@+id/snackbarMessage"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/snackbarButton"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:textColor="secondary"
|
||||
app:textSize="secondary"
|
||||
tools:text="Make QKSMS your default SMS app" />
|
||||
|
||||
<common.widget.QkTextView
|
||||
android:id="@+id/snackbarButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/ripple"
|
||||
android:padding="16dp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/tools_theme"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@id/snackbarMessage"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/snackbarTitle"
|
||||
app:textColor="theme"
|
||||
app:textSize="secondary"
|
||||
tools:text="Change" />
|
||||
|
||||
<common.widget.QkTextView
|
||||
android:id="@+id/syncingLabel"
|
||||
style="@style/TextPrimary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:paddingTop="16dp"
|
||||
android:text="@string/main_syncing"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/syncingProgress" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/syncingProgress"
|
||||
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:indeterminate="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
|
||||
@@ -56,18 +56,6 @@
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingTop="8dp">
|
||||
|
||||
<common.widget.PreferenceView
|
||||
android:id="@+id/defaultSms"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:title="@string/settings_default_sms_title" />
|
||||
|
||||
<common.widget.Separator
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="8dp" />
|
||||
|
||||
<common.widget.QkTextView
|
||||
style="@style/PreferenceCategory"
|
||||
android:text="@string/settings_category_appearance" />
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
|
||||
~
|
||||
~ This file is part of QKSMS.
|
||||
~
|
||||
~ QKSMS is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation, either version 3 of the License, or
|
||||
~ (at your option) any later version.
|
||||
~
|
||||
~ QKSMS is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License
|
||||
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<common.widget.QkTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/setup_title"
|
||||
app:textColor="primary"
|
||||
app:textSize="toolbar" />
|
||||
|
||||
<common.widget.QkTextView
|
||||
style="@style/TextSecondary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/setup_summary" />
|
||||
|
||||
<Space
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp">
|
||||
|
||||
<common.widget.QkTextView
|
||||
android:id="@+id/skip"
|
||||
style="@style/TextSecondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ripple"
|
||||
android:gravity="center"
|
||||
android:text="@string/setup_skip"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<common.widget.QkTextView
|
||||
android:id="@+id/next"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/ripple"
|
||||
android:gravity="center"
|
||||
android:text="@string/setup_next"
|
||||
android:textAllCaps="true"
|
||||
android:textStyle="bold"
|
||||
app:textColor="primary"
|
||||
app:textSize="secondary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<common.widget.Separator
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">রচনা করুন</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Hledat…</string>
|
||||
<string name="title_compose">Nová zpráva</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Zamilujte si znovu SMS</string>
|
||||
<string name="setup_summary">Nastavit QKSMS jako výchozí aplikaci pro zprávy SMS</string>
|
||||
<string name="main_default_sms_title">Zamilujte si znovu SMS</string>
|
||||
<string name="main_default_sms_message">Nastavit QKSMS jako výchozí aplikaci pro zprávy SMS</string>
|
||||
<string name="setup_skip">Přeskočit</string>
|
||||
<string name="setup_next">Pokračovat</string>
|
||||
<string name="menu_clear">Vymazat</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Søg i Indbakke…</string>
|
||||
<string name="title_compose">Angiv et navn eller nummer</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Elsk at SMS\'e igen</string>
|
||||
<string name="setup_summary">Gør QKSMS til din standard SMS-app</string>
|
||||
<string name="main_default_sms_title">Elsk at SMS\'e igen</string>
|
||||
<string name="main_default_sms_message">Gør QKSMS til din standard SMS-app</string>
|
||||
<string name="setup_skip">Overspring</string>
|
||||
<string name="setup_next">Fortsæt</string>
|
||||
<string name="menu_clear">Ryd</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">In Posteingang suchen…</string>
|
||||
<string name="title_compose">Verfassen</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Du wirst SMS wieder lieben</string>
|
||||
<string name="setup_summary">QKSMS als Standard-SMS-App festlegen</string>
|
||||
<string name="main_default_sms_title">Du wirst SMS wieder lieben</string>
|
||||
<string name="main_default_sms_message">QKSMS als Standard-SMS-App festlegen</string>
|
||||
<string name="setup_skip">Überspringen</string>
|
||||
<string name="setup_next">Weiter</string>
|
||||
<string name="menu_clear">Leeren</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Buscar mensaje…</string>
|
||||
<string name="title_compose">Escriba un nombre o número</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Ama mensajear otra vez</string>
|
||||
<string name="setup_summary">Haga de QKSMS su aplicación SMS prederminada</string>
|
||||
<string name="main_default_sms_title">Ama mensajear otra vez</string>
|
||||
<string name="main_default_sms_message">Haga de QKSMS su aplicación SMS prederminada</string>
|
||||
<string name="setup_skip">Omitir</string>
|
||||
<string name="setup_next">Continuar</string>
|
||||
<string name="menu_clear">Borrar</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">یافتن پیامک…</string>
|
||||
<string name="title_compose">Compose</string>
|
||||
<string name="title_qksms_plus">نسخه پیشرفته</string>
|
||||
<string name="setup_title">فرستادن مجدد</string>
|
||||
<string name="setup_summary">انتخاب به عنوان برنامه پیشفرض</string>
|
||||
<string name="main_default_sms_title">فرستادن مجدد</string>
|
||||
<string name="main_default_sms_message">انتخاب به عنوان برنامه پیشفرض</string>
|
||||
<string name="setup_skip">بیخیال</string>
|
||||
<string name="setup_next">ادامه</string>
|
||||
<string name="menu_clear">پاک کردن</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">Kirjoita</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Rechercher dans les conversations…</string>
|
||||
<string name="title_compose">Entrez un nom ou un numéro</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Réapprenez à aimer les textos</string>
|
||||
<string name="setup_summary">Faire de QKSMS l\'application par défaut pour les SMS</string>
|
||||
<string name="main_default_sms_title">Réapprenez à aimer les textos</string>
|
||||
<string name="main_default_sms_message">Faire de QKSMS l\'application par défaut pour les SMS</string>
|
||||
<string name="setup_skip">Plus tard</string>
|
||||
<string name="setup_next">Continuer</string>
|
||||
<string name="menu_clear">Effacer</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">रचना</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Pretraži poruke…</string>
|
||||
<string name="title_compose">Unesite ime ili broj</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Ponovno zavolite poruke</string>
|
||||
<string name="setup_summary">Postavite QKSMS kao zadanu aplikaciju za SMS</string>
|
||||
<string name="main_default_sms_title">Ponovno zavolite poruke</string>
|
||||
<string name="main_default_sms_message">Postavite QKSMS kao zadanu aplikaciju za SMS</string>
|
||||
<string name="setup_skip">Preskoči</string>
|
||||
<string name="setup_next">Nastavi</string>
|
||||
<string name="menu_clear">Očisti</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">Üzenetírás</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Cari kotak masuk…</string>
|
||||
<string name="title_compose">Tulis Pesan baru</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Buat QKSMS aplikasi SMS default Anda</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Buat QKSMS aplikasi SMS default Anda</string>
|
||||
<string name="setup_skip">Lewati</string>
|
||||
<string name="setup_next">Lanjutkan</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Cerca posta in arrivo…</string>
|
||||
<string name="title_compose">Scrivi</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Rendi QKSMS l\'app SMS predefinita</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Rendi QKSMS l\'app SMS predefinita</string>
|
||||
<string name="setup_skip">Salta</string>
|
||||
<string name="setup_next">Continua</string>
|
||||
<string name="menu_clear">Azzera</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">כתוב הודעה</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">受信トレイを検索…</string>
|
||||
<string name="title_compose">作成</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">愛のテキストメッセージをふたたび</string>
|
||||
<string name="setup_summary">QKSMS をデフォルトの SMS アプリにします</string>
|
||||
<string name="main_default_sms_title">愛のテキストメッセージをふたたび</string>
|
||||
<string name="main_default_sms_message">QKSMS をデフォルトの SMS アプリにします</string>
|
||||
<string name="setup_skip">スキップ</string>
|
||||
<string name="setup_next">続行</string>
|
||||
<string name="menu_clear">クリア</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">수신함에서 찾기...</string>
|
||||
<string name="title_compose">문자작성</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">다시 문자를 즐겁게</string>
|
||||
<string name="setup_summary">QKSMS를 기본 SMS 앱으로 설정하세요</string>
|
||||
<string name="main_default_sms_title">다시 문자를 즐겁게</string>
|
||||
<string name="main_default_sms_message">QKSMS를 기본 SMS 앱으로 설정하세요</string>
|
||||
<string name="setup_skip">건너뛰기</string>
|
||||
<string name="setup_next">계속</string>
|
||||
<string name="menu_clear">비우기</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">Rašyti</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">Compose</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Doorzoek inbox…</string>
|
||||
<string name="title_compose">Type een naam of nummer</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Maak QKSMS jouw standaard SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Maak QKSMS jouw standaard SMS app</string>
|
||||
<string name="setup_skip">Overslaan</string>
|
||||
<string name="setup_next">Verder</string>
|
||||
<string name="menu_clear">Annuleren</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">Type a name or number</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Przeszukaj skrzynkę odbiorczą…</string>
|
||||
<string name="title_compose">Nowa wiadomość</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Znów kocham pisać wiadomości</string>
|
||||
<string name="setup_summary">Uczyń QKSMS domyślną aplikacja do obsługi SMSów</string>
|
||||
<string name="main_default_sms_title">Znów kocham pisać wiadomości</string>
|
||||
<string name="main_default_sms_message">Uczyń QKSMS domyślną aplikacja do obsługi SMSów</string>
|
||||
<string name="setup_skip">Pomiń</string>
|
||||
<string name="setup_next">Kontynuuj</string>
|
||||
<string name="menu_clear">Wyczyść</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Pesquisar caixa de entrada…</string>
|
||||
<string name="title_compose">Nova Mensagem</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Volta a amar os SMS</string>
|
||||
<string name="setup_summary">Tornar QKSMS a aplicação padrão</string>
|
||||
<string name="main_default_sms_title">Volta a amar os SMS</string>
|
||||
<string name="main_default_sms_message">Tornar QKSMS a aplicação padrão</string>
|
||||
<string name="setup_skip">Pular</string>
|
||||
<string name="setup_next">Continuar</string>
|
||||
<string name="menu_clear">Limpar</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Pesquisar caixa de entrada…</string>
|
||||
<string name="title_compose">Nova mensagem</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Volta a amar os SMS</string>
|
||||
<string name="setup_summary">Tornar QKSMS a aplicação padrão</string>
|
||||
<string name="main_default_sms_title">Volta a amar os SMS</string>
|
||||
<string name="main_default_sms_message">Tornar QKSMS a aplicação padrão</string>
|
||||
<string name="setup_skip">Ignorar</string>
|
||||
<string name="setup_next">Continuar</string>
|
||||
<string name="menu_clear">Limpar</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Caută în inbox...</string>
|
||||
<string name="title_compose">Compune</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Iubesc să scriu din nou</string>
|
||||
<string name="setup_summary">Fă QKSMS aplicația de mesaje prestabilită</string>
|
||||
<string name="main_default_sms_title">Iubesc să scriu din nou</string>
|
||||
<string name="main_default_sms_message">Fă QKSMS aplicația de mesaje prestabilită</string>
|
||||
<string name="setup_skip">Sari</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Поиск во входящих…</string>
|
||||
<string name="title_compose">Написать</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Снова нравится писать</string>
|
||||
<string name="setup_summary">Сделать QKSMS приложением для SMS по умолчанию</string>
|
||||
<string name="main_default_sms_title">Снова нравится писать</string>
|
||||
<string name="main_default_sms_message">Сделать QKSMS приложением для SMS по умолчанию</string>
|
||||
<string name="setup_skip">Пропустить</string>
|
||||
<string name="setup_next">Продолжить</string>
|
||||
<string name="menu_clear">Очистить</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">Nová správa</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">Састављање</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Sök i inkorg…</string>
|
||||
<string name="title_compose">Nytt meddelande</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Gör QKSMS till din standard SMS-app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Gör QKSMS till din standard SMS-app</string>
|
||||
<string name="setup_skip">Hoppa över</string>
|
||||
<string name="setup_next">Fortsätt</string>
|
||||
<string name="menu_clear">Rensa</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">Sumulat</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">Oluştur</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Tìm kiếm các tin đã nhận…</string>
|
||||
<string name="title_compose">Nhập tên hoặc số điện thoại</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Thích nhắn tin trở lại</string>
|
||||
<string name="setup_summary">Đặt QKSMS là ứng dụng tin nhắn mặc định</string>
|
||||
<string name="main_default_sms_title">Thích nhắn tin trở lại</string>
|
||||
<string name="main_default_sms_message">Đặt QKSMS là ứng dụng tin nhắn mặc định</string>
|
||||
<string name="setup_skip">Bỏ qua</string>
|
||||
<string name="setup_next">Tiếp tục</string>
|
||||
<string name="menu_clear">Xóa</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">撰写</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">使 QKSMS 成为您的默认短信应用</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">使 QKSMS 成为您的默认短信应用</string>
|
||||
<string name="setup_skip">跳过</string>
|
||||
<string name="setup_next">继续</string>
|
||||
<string name="menu_clear">清除</string>
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
<string name="title_conversations">Search inbox…</string>
|
||||
<string name="title_compose">編輯</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
<string name="menu_clear">Clear</string>
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
<string name="title_compose">Type a name or number</string>
|
||||
<string name="title_qksms_plus">QKSMS+</string>
|
||||
|
||||
<string name="setup_title">Love texting again</string>
|
||||
<string name="setup_summary">Make QKSMS your default SMS app</string>
|
||||
<string name="setup_skip">Skip</string>
|
||||
<string name="setup_next">Continue</string>
|
||||
|
||||
@@ -44,13 +42,20 @@
|
||||
<string name="main_menu_unarchive">Unarchive</string>
|
||||
<string name="main_menu_block">Block</string>
|
||||
<string name="main_menu_delete">Delete</string>
|
||||
<string name="main_syncing">Optimizing database, this might take a minute…</string>
|
||||
<string name="main_syncing">Syncing messages…</string>
|
||||
<string name="main_sender_you">You: %s</string>
|
||||
<string name="inbox_empty_text">Your conversations will appear here</string>
|
||||
<string name="inbox_search_empty_text">No results</string>
|
||||
<string name="archived_empty_text">Your archived conversations will appear here</string>
|
||||
<string name="scheduled_empty_text">Your scheduled messages will appear here</string>
|
||||
<string name="main_fab_cd">Start new conversation</string>
|
||||
<string name="main_default_sms_title">Love texting again</string>
|
||||
<string name="main_default_sms_message">Make QKSMS your default SMS app</string>
|
||||
<string name="main_default_sms_change">Change</string>
|
||||
<string name="main_permission_required">Permission required</string>
|
||||
<string name="main_permission_sms">QKSMS needs permission to send and view SMS messages</string>
|
||||
<string name="main_permission_contacts">QKSMS needs permission to view your contacts</string>
|
||||
<string name="main_permission_allow">Allow</string>
|
||||
|
||||
<string name="drawer_inbox">Inbox</string>
|
||||
<string name="drawer_archived">Archived</string>
|
||||
@@ -104,9 +109,6 @@
|
||||
<string name="settings_category_general">General</string>
|
||||
<string name="settings_category_qkreply">QK Reply</string>
|
||||
|
||||
<string name="settings_default_sms_title">Default SMS app</string>
|
||||
<string name="settings_default_sms_summary_true">QKSMS is your default SMS app</string>
|
||||
<string name="settings_default_sms_summary_false">Set QKSMS as your default SMS app</string>
|
||||
<string name="settings_theme_title">Theme</string>
|
||||
<string name="settings_night_title">Night mode</string>
|
||||
<string name="settings_black_title">Pure black night mode</string>
|
||||
|
||||
Reference in New Issue
Block a user