mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-02-10 08:40:37 +01:00
updating commons
This commit is contained in:
parent
47cba56e31
commit
cc04594d31
@ -62,7 +62,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:09e6c15f70'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:332725a9fc'
|
||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||
implementation 'com.klinkerapps:android-smsmms:5.2.6'
|
||||
implementation 'com.github.tibbi:IndicatorFastScroll:4524cd0b61'
|
||||
|
@ -205,7 +205,7 @@ class MainActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
private fun getNewConversations(cachedConversations: ArrayList<Conversation>) {
|
||||
val privateCursor = getMyContactsCursor(false, true)?.loadInBackground()
|
||||
val privateCursor = getMyContactsCursor(false, true)
|
||||
ensureBackgroundThread {
|
||||
val privateContacts = MyContactsContentProvider.getSimpleContacts(this, privateCursor)
|
||||
val conversations = getConversations(privateContacts = privateContacts)
|
||||
|
@ -173,7 +173,7 @@ class NewConversationActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
private fun fillSuggestedContacts(callback: () -> Unit) {
|
||||
val privateCursor = getMyContactsCursor(false, true)?.loadInBackground()
|
||||
val privateCursor = getMyContactsCursor(false, true)
|
||||
ensureBackgroundThread {
|
||||
privateContacts = MyContactsContentProvider.getSimpleContacts(this, privateCursor)
|
||||
val suggestions = getSuggestedContacts(privateContacts)
|
||||
|
@ -232,7 +232,7 @@ class ThreadActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
private fun setupThread() {
|
||||
val privateCursor = getMyContactsCursor(false, true)?.loadInBackground()
|
||||
val privateCursor = getMyContactsCursor(false, true)
|
||||
ensureBackgroundThread {
|
||||
privateContacts = MyContactsContentProvider.getSimpleContacts(this, privateCursor)
|
||||
|
||||
|
@ -669,7 +669,7 @@ fun Context.getThreadId(addresses: Set<String>): Long {
|
||||
}
|
||||
|
||||
fun Context.showReceivedMessageNotification(address: String, body: String, threadId: Long, bitmap: Bitmap?) {
|
||||
val privateCursor = getMyContactsCursor(false, true)?.loadInBackground()
|
||||
val privateCursor = getMyContactsCursor(false, true)
|
||||
ensureBackgroundThread {
|
||||
val senderName = getNameFromAddress(address, privateCursor)
|
||||
|
||||
@ -689,7 +689,7 @@ fun Context.getNameFromAddress(address: String, privateCursor: Cursor?): String
|
||||
}
|
||||
|
||||
fun Context.getContactFromAddress(address: String, callback: ((contact: SimpleContact?) -> Unit)) {
|
||||
val privateCursor = getMyContactsCursor(false, true)?.loadInBackground()
|
||||
val privateCursor = getMyContactsCursor(false, true)
|
||||
SimpleContactsHelper(this).getAvailableContacts(false) {
|
||||
val contact = it.firstOrNull { it.doesHavePhoneNumber(address) }
|
||||
if (contact == null) {
|
||||
|
@ -47,7 +47,7 @@ class SmsReceiver : BroadcastReceiver() {
|
||||
val bitmap = getPhotoForNotification(address, context)
|
||||
|
||||
Handler(Looper.getMainLooper()).post {
|
||||
val privateCursor = context.getMyContactsCursor(false, true)?.loadInBackground()
|
||||
val privateCursor = context.getMyContactsCursor(false, true)
|
||||
if (!context.isNumberBlocked(address)) {
|
||||
ensureBackgroundThread {
|
||||
val newMessageId = context.insertNewSMS(address, subject, body, date, read, threadId, type, subscriptionId)
|
||||
|
@ -51,7 +51,7 @@ class SmsStatusSentReceiver : SentReceiver() {
|
||||
|
||||
private fun showSendingFailedNotification(context: Context, messageId: Long) {
|
||||
Handler(Looper.getMainLooper()).post {
|
||||
val privateCursor = context.getMyContactsCursor(false, true)?.loadInBackground()
|
||||
val privateCursor = context.getMyContactsCursor(false, true)
|
||||
ensureBackgroundThread {
|
||||
val address = context.getMessageRecipientAddress(messageId)
|
||||
val threadId = context.getThreadId(address)
|
||||
|
Loading…
x
Reference in New Issue
Block a user