mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 11:38:51 +01:00
When necessary, show dialog prompting user to go to external blocking manager
This commit is contained in:
@@ -35,9 +35,9 @@ interface BlockingClient {
|
||||
fun canBlock(): Boolean = false
|
||||
|
||||
/**
|
||||
* Blocks the number or opens the manager
|
||||
* Blocks the numbers or opens the manager
|
||||
*/
|
||||
fun block(address: String): Completable
|
||||
fun block(addresses: List<String>): Completable
|
||||
|
||||
/**
|
||||
* Returns true if the client is capable of unblocking the address in the manager without any
|
||||
@@ -46,8 +46,8 @@ interface BlockingClient {
|
||||
fun canUnblock(): Boolean = false
|
||||
|
||||
/**
|
||||
* Unblocks the number or opens the manager
|
||||
* Unblocks the numbers or opens the manager
|
||||
*/
|
||||
fun unblock(address: String): Completable
|
||||
fun unblock(addresses: List<String>): Completable
|
||||
|
||||
}
|
||||
@@ -43,6 +43,11 @@ interface ConversationRepository {
|
||||
|
||||
fun getConversation(threadId: Long): Conversation?
|
||||
|
||||
/**
|
||||
* Returns all conversations with an id in [threadIds]
|
||||
*/
|
||||
fun getConversations(vararg threadIds: Long): RealmResults<Conversation>
|
||||
|
||||
fun getThreadId(recipient: String): Long?
|
||||
|
||||
fun getThreadId(recipients: Collection<String>): Long?
|
||||
|
||||
@@ -60,6 +60,10 @@ class Preferences @Inject constructor(private val rxPrefs: RxSharedPreferences)
|
||||
const val SWIPE_ACTION_CALL = 3
|
||||
const val SWIPE_ACTION_READ = 4
|
||||
const val SWIPE_ACTION_UNREAD = 5
|
||||
|
||||
const val BLOCKING_MANAGER_QKSMS = 0
|
||||
const val BLOCKING_MANAGER_CC = 1
|
||||
const val BLOCKING_MANAGER_SIA = 2
|
||||
}
|
||||
|
||||
// Internal
|
||||
@@ -76,6 +80,7 @@ class Preferences @Inject constructor(private val rxPrefs: RxSharedPreferences)
|
||||
val black = rxPrefs.getBoolean("black", false)
|
||||
val systemFont = rxPrefs.getBoolean("systemFont", false)
|
||||
val textSize = rxPrefs.getInteger("textSize", TEXT_SIZE_NORMAL)
|
||||
val blockingManager = rxPrefs.getInteger("blockingManager", BLOCKING_MANAGER_QKSMS)
|
||||
val callControl = rxPrefs.getBoolean("callControl", false)
|
||||
val sia = rxPrefs.getBoolean("sia", false)
|
||||
val drop = rxPrefs.getBoolean("drop", false)
|
||||
|
||||
Reference in New Issue
Block a user