mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 12:35:30 +03:00
ktlintFormat
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
fc2ff534e9
commit
d08167e3dd
10 changed files with 96 additions and 114 deletions
|
@ -166,10 +166,7 @@ class ContactItem(
|
|||
}
|
||||
}
|
||||
|
||||
private fun setGenericAvatar(
|
||||
holder: ContactItemViewHolder,
|
||||
roundPlaceholderDrawable: Int
|
||||
) {
|
||||
private fun setGenericAvatar(holder: ContactItemViewHolder, roundPlaceholderDrawable: Int) {
|
||||
val avatar =
|
||||
viewThemeUtils.talk.themePlaceholderAvatar(
|
||||
holder.binding.avatarView,
|
||||
|
|
|
@ -206,7 +206,6 @@ fun ImageView.loadThumbnail(url: String, user: User): io.reactivex.disposables.D
|
|||
.target(this)
|
||||
.transformations(CircleCropTransformation())
|
||||
|
||||
|
||||
val layers = arrayOfNulls<Drawable>(2)
|
||||
layers[0] = ContextCompat.getDrawable(context, R.drawable.ic_launcher_background)
|
||||
layers[1] = ContextCompat.getDrawable(context, R.drawable.ic_launcher_foreground)
|
||||
|
@ -271,7 +270,6 @@ fun ImageView.loadUserAvatar(any: Any?): io.reactivex.disposables.Disposable {
|
|||
}
|
||||
|
||||
fun ImageView.loadSystemAvatar(): io.reactivex.disposables.Disposable {
|
||||
|
||||
val layers = arrayOfNulls<Drawable>(2)
|
||||
layers[0] = ContextCompat.getDrawable(context, R.drawable.ic_launcher_background)
|
||||
layers[1] = ContextCompat.getDrawable(context, R.drawable.ic_launcher_foreground)
|
||||
|
@ -286,14 +284,12 @@ fun ImageView.loadSystemAvatar(): io.reactivex.disposables.Disposable {
|
|||
}
|
||||
|
||||
fun ImageView.loadNoteToSelfAvatar(): io.reactivex.disposables.Disposable {
|
||||
|
||||
val layers = arrayOfNulls<Drawable>(2)
|
||||
layers[0] = ContextCompat.getDrawable(context, R.drawable.ic_launcher_background)
|
||||
layers[1] = ContextCompat.getDrawable(context, R.drawable.ic_note_to_self)
|
||||
val layerDrawable = LayerDrawable(layers)
|
||||
val data: Any = layerDrawable
|
||||
|
||||
|
||||
return DisposableWrapper(
|
||||
load(data) {
|
||||
transformations(CircleCropTransformation())
|
||||
|
@ -306,7 +302,6 @@ fun ImageView.loadChangelogBotAvatar(): io.reactivex.disposables.Disposable {
|
|||
}
|
||||
|
||||
fun ImageView.loadBotsAvatar(): io.reactivex.disposables.Disposable {
|
||||
|
||||
val layers = arrayOfNulls<Drawable>(2)
|
||||
layers[0] = ColorDrawable(context.getColor(R.color.black))
|
||||
layers[1] = TextDrawable(context, ">")
|
||||
|
|
|
@ -378,7 +378,6 @@ class SettingsActivity : BaseActivity(), SetPhoneNumberDialogFragment.SetPhoneNu
|
|||
)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun setTroubleshootingClickListenersIfNecessary() {
|
||||
|
@ -860,10 +859,8 @@ class SettingsActivity : BaseActivity(), SetPhoneNumberDialogFragment.SetPhoneNu
|
|||
private fun setupCheckables() {
|
||||
binding.settingsScreenSecuritySwitch.isChecked = appPreferences.isScreenSecured
|
||||
|
||||
|
||||
binding.settingsIncognitoKeyboardSwitch.isChecked = appPreferences.isKeyboardIncognito
|
||||
|
||||
|
||||
if (CapabilitiesUtil.isReadStatusAvailable(currentUser!!.capabilities!!.spreedCapability!!)) {
|
||||
binding.settingsReadPrivacySwitch.isChecked = !CapabilitiesUtil.isReadStatusPrivate(currentUser!!)
|
||||
} else {
|
||||
|
|
|
@ -101,7 +101,6 @@ object FileUtils {
|
|||
val aboveOrEqualAPI26Check =
|
||||
!cachedFile.toPath().normalize().startsWith(context.cacheDir.toPath())
|
||||
|
||||
|
||||
val isOutsideCacheDir = aboveOrEqualAPI26Check
|
||||
|
||||
if (isOutsideCacheDir) {
|
||||
|
|
|
@ -54,7 +54,6 @@ object NotificationUtils {
|
|||
const val KEY_UPLOAD_GROUP = "com.nextcloud.talk.utils.KEY_UPLOAD_GROUP"
|
||||
const val GROUP_SUMMARY_NOTIFICATION_ID = -1
|
||||
|
||||
|
||||
private fun createNotificationChannel(
|
||||
context: Context,
|
||||
notificationChannel: Channel,
|
||||
|
@ -151,7 +150,6 @@ object NotificationUtils {
|
|||
}
|
||||
|
||||
fun removeOldNotificationChannels(context: Context) {
|
||||
|
||||
val notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
|
||||
// Current version does not use notification channel groups - delete all groups
|
||||
|
@ -167,10 +165,8 @@ object NotificationUtils {
|
|||
notificationManager.deleteNotificationChannel(channel.id)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private fun getNotificationChannel(context: Context, channelId: String): NotificationChannel? {
|
||||
val notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
return notificationManager.getNotificationChannel(channelId)
|
||||
|
@ -283,7 +279,6 @@ object NotificationUtils {
|
|||
defaultRingtoneUri: String,
|
||||
channelId: String
|
||||
): Uri? {
|
||||
|
||||
val channel = getNotificationChannel(context, channelId)
|
||||
if (channel != null) {
|
||||
return channel.sound
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
package com.nextcloud.talk.utils
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.os.VibrationEffect
|
||||
import android.os.Vibrator
|
||||
|
||||
|
|
Loading…
Reference in a new issue