Skip to content

Commit

Permalink
lint warnings
Browse files Browse the repository at this point in the history
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
  • Loading branch information
sowjanyakch committed Nov 18, 2024
1 parent 135c158 commit e107254
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import kotlinx.coroutines.withContext
import javax.inject.Inject

@AutoInjector(NextcloudTalkApplication::class)
@SuppressLint("TooGenericExceptionCaught")
class ConversationsListBottomDialog(
val activity: ConversationsListActivity,
val currentUser: User,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/
package com.nextcloud.talk.utils.preferences.preferencestorage

import android.annotation.SuppressLint
import android.text.TextUtils
import android.util.Log
import autodagger.AutoInjector
Expand All @@ -32,6 +33,7 @@ import kotlinx.coroutines.withContext
import javax.inject.Inject

@AutoInjector(NextcloudTalkApplication::class)
@SuppressLint("TooGenericExceptionCaught")
class DatabaseStorageModule(conversationUser: User, conversationToken: String) {

@JvmField
Expand Down Expand Up @@ -73,7 +75,7 @@ class DatabaseStorageModule(conversationUser: User, conversationToken: String) {
try {
ncApiCoroutines!!.notificationCalls(credentials!!, url, notificationLevel)
Log.d(TAG, "Toggled notification calls")
} catch (e: Throwable) {
} catch (e: Exception) {
Log.e(TAG, "Error when trying to toggle notification calls", e)
}
}
Expand All @@ -94,7 +96,7 @@ class DatabaseStorageModule(conversationUser: User, conversationToken: String) {
when (key) {
"conversation_settings_dropdown" -> {
try {
val apiVersion = getConversationApiVersion(conversationUser, intArrayOf(4))
val apiVersion = getConversationApiVersion(conversationUser, intArrayOf(API_VERSION_4))
val trimmedValue = value.replace("expire_", "")
val valueInt = trimmedValue.toInt()
withContext(Dispatchers.IO) {
Expand Down Expand Up @@ -202,5 +204,6 @@ class DatabaseStorageModule(conversationUser: User, conversationToken: String) {
private const val NOTIFICATION_NEVER = 3
private const val NOTIFICATION_MENTION = 2
private const val NOTIFICATION_ALWAYS = 1
private const val API_VERSION_4 = 4
}
}

0 comments on commit e107254

Please sign in to comment.