mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-12 10:32:36 +00:00
reformat kotlin
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
6b7dd29b07
commit
0ac5009242
@ -161,7 +161,9 @@ class AccountVerificationController(args: Bundle? = null) :
|
||||
RouterTransaction.with(
|
||||
WebViewLoginController(
|
||||
baseUrl,
|
||||
false, username, ""
|
||||
false,
|
||||
username,
|
||||
""
|
||||
)
|
||||
)
|
||||
.pushChangeHandler(HorizontalChangeHandler())
|
||||
|
@ -56,7 +56,8 @@ class RingtoneSelectionController(args: Bundle) :
|
||||
NewBaseController(
|
||||
R.layout.controller_generic_rv,
|
||||
args
|
||||
), FlexibleAdapter.OnItemClickListener {
|
||||
),
|
||||
FlexibleAdapter.OnItemClickListener {
|
||||
private val binding: ControllerGenericRvBinding by viewBinding(ControllerGenericRvBinding::bind)
|
||||
|
||||
private var adapter: FlexibleAdapter<*>? = null
|
||||
@ -108,9 +109,8 @@ class RingtoneSelectionController(args: Bundle) :
|
||||
var preferencesString: String? = null
|
||||
if (callNotificationSounds &&
|
||||
TextUtils.isEmpty(appPreferences!!.callRingtoneUri.also { preferencesString = it }) ||
|
||||
!callNotificationSounds && TextUtils.isEmpty(
|
||||
appPreferences!!.messageRingtoneUri.also { preferencesString = it }
|
||||
)
|
||||
!callNotificationSounds &&
|
||||
TextUtils.isEmpty(appPreferences!!.messageRingtoneUri.also { preferencesString = it })
|
||||
) {
|
||||
adapter!!.toggleSelection(1)
|
||||
foundDefault = true
|
||||
@ -127,8 +127,8 @@ class RingtoneSelectionController(args: Bundle) :
|
||||
var notificationSoundItem: NotificationSoundItem?
|
||||
for (i in 2 until adapter!!.itemCount) {
|
||||
notificationSoundItem = adapter!!.getItem(i) as NotificationSoundItem?
|
||||
if (notificationSoundItem!!.notificationSoundUri == ringtoneSettings.getRingtoneUri()
|
||||
.toString()
|
||||
if (
|
||||
notificationSoundItem!!.notificationSoundUri == ringtoneSettings.getRingtoneUri().toString()
|
||||
) {
|
||||
adapter!!.toggleSelection(i)
|
||||
break
|
||||
|
@ -56,9 +56,7 @@ import com.nextcloud.talk.databinding.ControllerWebViewLoginBinding
|
||||
import com.nextcloud.talk.events.CertificateEvent
|
||||
import com.nextcloud.talk.jobs.PushRegistrationWorker
|
||||
import com.nextcloud.talk.models.LoginData
|
||||
import com.nextcloud.talk.models.database.UserEntity
|
||||
import com.nextcloud.talk.utils.DisplayUtils
|
||||
import com.nextcloud.talk.utils.bundle.BundleKeys
|
||||
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_BASE_URL
|
||||
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_ORIGINAL_PROTOCOL
|
||||
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_TOKEN
|
||||
@ -129,12 +127,13 @@ class WebViewLoginController(args: Bundle? = null) : NewBaseController(
|
||||
|
||||
private val webLoginUserAgent: String
|
||||
get() = (
|
||||
Build.MANUFACTURER.substring(0, 1).toUpperCase(Locale.getDefault())
|
||||
+ Build.MANUFACTURER.substring(1).toLowerCase(Locale.getDefault())
|
||||
+ " "
|
||||
+ Build.MODEL
|
||||
+ " ("
|
||||
+ resources!!.getString(R.string.nc_app_product_name) + ")"
|
||||
Build.MANUFACTURER.substring(0, 1).toUpperCase(Locale.getDefault()) +
|
||||
Build.MANUFACTURER.substring(1).toLowerCase(Locale.getDefault()) +
|
||||
" " +
|
||||
Build.MODEL +
|
||||
" (" +
|
||||
resources!!.getString(R.string.nc_app_product_name) +
|
||||
")"
|
||||
)
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
|
Loading…
Reference in New Issue
Block a user