Migrate to non-transitive R Classes

This commit is contained in:
Naveen 2023-08-24 20:59:34 +05:30
parent 166998f86e
commit 69ff590cf0
No known key found for this signature in database
GPG key ID: 0E155DAD31671DA3
31 changed files with 170 additions and 130 deletions

View file

@ -11,8 +11,7 @@ import com.simplemobiletools.commons.helpers.IS_PRIVATE
import com.simplemobiletools.commons.helpers.SimpleContactsHelper
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
import com.simplemobiletools.commons.models.SimpleContact
import com.simplemobiletools.smsmessenger.R
import java.util.*
import java.util.Locale
fun Activity.dialNumber(phoneNumber: String, callback: (() -> Unit)? = null) {
hideKeyboard()
@ -23,7 +22,7 @@ fun Activity.dialNumber(phoneNumber: String, callback: (() -> Unit)? = null) {
startActivity(this)
callback?.invoke()
} catch (e: ActivityNotFoundException) {
toast(R.string.no_app_found)
toast(com.simplemobiletools.commons.R.string.no_app_found)
} catch (e: Exception) {
showErrorToast(e)
}
@ -44,7 +43,7 @@ fun Activity.launchViewIntent(uri: Uri, mimetype: String, filename: String) {
if (newMimetype.isNotEmpty() && mimetype != newMimetype) {
launchViewIntent(uri, newMimetype, filename)
} else {
toast(R.string.no_app_found)
toast(com.simplemobiletools.commons.R.string.no_app_found)
}
} catch (e: Exception) {
showErrorToast(e)

View file

@ -631,7 +631,7 @@ fun Context.removeAllArchivedConversations(callback: (() -> Unit)? = null) {
toast(R.string.archive_emptied_successfully)
callback?.invoke()
} catch (e: Exception) {
toast(R.string.unknown_error_occurred)
toast(com.simplemobiletools.commons.R.string.unknown_error_occurred)
}
}
}