mirror of
https://github.com/nextcloud/android.git
synced 2024-11-29 18:59:18 +03:00
Merge pull request #6786 from nextcloud/dependabot/gradle/com.pinterest-ktlint-0.38.0
Bump ktlint from 0.37.2 to 0.38.0
This commit is contained in:
commit
a90cf6a364
8 changed files with 30 additions and 19 deletions
|
@ -333,7 +333,7 @@ dependencies {
|
|||
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
|
||||
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
|
||||
|
||||
ktlint "com.pinterest:ktlint:0.37.2"
|
||||
ktlint "com.pinterest:ktlint:0.38.0"
|
||||
implementation 'org.conscrypt:conscrypt-android:2.5.0'
|
||||
|
||||
// Shimmer animation
|
||||
|
|
|
@ -49,7 +49,8 @@ class ShowErrorActivity : AppCompatActivity() {
|
|||
|
||||
val snackbar = DisplayUtils.createSnackbar(
|
||||
error_page_container,
|
||||
R.string.error_report_issue_text, Snackbar.LENGTH_INDEFINITE
|
||||
R.string.error_report_issue_text,
|
||||
Snackbar.LENGTH_INDEFINITE
|
||||
)
|
||||
.setAction(R.string.error_report_issue_action) { reportIssue() }
|
||||
|
||||
|
|
|
@ -150,7 +150,8 @@ class AccountRemovalWork(
|
|||
)
|
||||
pushArbitraryData.isShouldBeDeleted = true
|
||||
arbitraryDataProvider.storeOrUpdateKeyValue(
|
||||
user.accountName, PushUtils.KEY_PUSH,
|
||||
user.accountName,
|
||||
PushUtils.KEY_PUSH,
|
||||
gson.toJson(pushArbitraryData)
|
||||
)
|
||||
PushUtils.pushRegistrationToServer(userAccountManager, pushArbitraryData.getPushToken())
|
||||
|
|
|
@ -124,8 +124,11 @@ class ContactsBackupWork(
|
|||
private fun backupContact(user: User, backupFolder: String) {
|
||||
val vCard = ArrayList<String>()
|
||||
val cursor = contentResolver.query(
|
||||
ContactsContract.Contacts.CONTENT_URI, null,
|
||||
null, null, null
|
||||
ContactsContract.Contacts.CONTENT_URI,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
)
|
||||
if (cursor != null && cursor.count > 0) {
|
||||
cursor.moveToFirst()
|
||||
|
|
|
@ -117,7 +117,12 @@ class FilesSyncWork(
|
|||
for (syncedFolder in syncedFolderProvider.syncedFolders) {
|
||||
if (syncedFolder.isEnabled && (!skipCustom || MediaFolderType.CUSTOM != syncedFolder.type)) {
|
||||
syncFolder(
|
||||
context, resources, lightVersion, filesystemDataProvider, currentLocale, dateFormat,
|
||||
context,
|
||||
resources,
|
||||
lightVersion,
|
||||
filesystemDataProvider,
|
||||
currentLocale,
|
||||
dateFormat,
|
||||
syncedFolder
|
||||
)
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ import com.owncloud.android.datamodel.MediaFoldersModel
|
|||
import com.owncloud.android.datamodel.MediaProvider
|
||||
import com.owncloud.android.datamodel.SyncedFolderProvider
|
||||
import com.owncloud.android.lib.common.utils.Log_OC
|
||||
import com.owncloud.android.ui.activity.ManageAccountsActivity
|
||||
import com.owncloud.android.ui.activity.ManageAccountsActivity.PENDING_FOR_REMOVAL
|
||||
import com.owncloud.android.ui.activity.SyncedFoldersActivity
|
||||
import com.owncloud.android.ui.notifications.NotificationUtils
|
||||
import com.owncloud.android.utils.ThemeUtils
|
||||
|
@ -123,10 +123,7 @@ class MediaFoldersDetectionWork constructor(
|
|||
val allUsers = userAccountManager.allUsers
|
||||
val activeUsers: MutableList<User> = ArrayList()
|
||||
for (account in allUsers) {
|
||||
if (!arbitraryDataProvider.getBooleanValue(
|
||||
account.toPlatformAccount(),
|
||||
ManageAccountsActivity.PENDING_FOR_REMOVAL
|
||||
)
|
||||
if (!arbitraryDataProvider.getBooleanValue(account.toPlatformAccount(), PENDING_FOR_REMOVAL)
|
||||
) {
|
||||
activeUsers.add(account)
|
||||
}
|
||||
|
@ -176,7 +173,8 @@ class MediaFoldersDetectionWork constructor(
|
|||
} else {
|
||||
mediaFoldersModel = MediaFoldersModel(imageMediaFolderPaths, videoMediaFolderPaths)
|
||||
arbitraryDataProvider.storeOrUpdateKeyValue(
|
||||
ACCOUNT_NAME_GLOBAL, KEY_MEDIA_FOLDERS,
|
||||
ACCOUNT_NAME_GLOBAL,
|
||||
KEY_MEDIA_FOLDERS,
|
||||
gson.toJson(mediaFoldersModel)
|
||||
)
|
||||
}
|
||||
|
@ -195,7 +193,8 @@ class MediaFoldersDetectionWork constructor(
|
|||
intent.putExtra(SyncedFoldersActivity.EXTRA_SHOW_SIDEBAR, true)
|
||||
val pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT)
|
||||
val notificationBuilder = NotificationCompat.Builder(
|
||||
context, NotificationUtils.NOTIFICATION_CHANNEL_GENERAL
|
||||
context,
|
||||
NotificationUtils.NOTIFICATION_CHANNEL_GENERAL
|
||||
)
|
||||
.setSmallIcon(R.drawable.notification_icon)
|
||||
.setLargeIcon(BitmapFactory.decodeResource(context.resources, R.drawable.notification_icon))
|
||||
|
|
|
@ -179,13 +179,16 @@ class NotificationWork constructor(
|
|||
disableDetection.putExtra(PUSH_NOTIFICATION_ID, pushNotificationId)
|
||||
disableDetection.putExtra(KEY_NOTIFICATION_ACCOUNT, user.accountName)
|
||||
val disableIntent = PendingIntent.getBroadcast(
|
||||
context, pushNotificationId, disableDetection,
|
||||
context,
|
||||
pushNotificationId,
|
||||
disableDetection,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT
|
||||
)
|
||||
notificationBuilder.addAction(
|
||||
NotificationCompat.Action(
|
||||
R.drawable.ic_close,
|
||||
context.getString(R.string.remove_push_notification), disableIntent
|
||||
context.getString(R.string.remove_push_notification),
|
||||
disableIntent
|
||||
)
|
||||
)
|
||||
} else { // Actions
|
||||
|
@ -197,7 +200,8 @@ class NotificationWork constructor(
|
|||
actionIntent.putExtra(KEY_NOTIFICATION_ACTION_LINK, action.link)
|
||||
actionIntent.putExtra(KEY_NOTIFICATION_ACTION_TYPE, action.type)
|
||||
val actionPendingIntent = PendingIntent.getBroadcast(
|
||||
context, randomId.nextInt(),
|
||||
context,
|
||||
randomId.nextInt(),
|
||||
actionIntent,
|
||||
PendingIntent.FLAG_CANCEL_CURRENT
|
||||
)
|
||||
|
|
|
@ -58,9 +58,7 @@ class TextEditorWebView : EditorWebView() {
|
|||
|
||||
webview.addJavascriptInterface(MobileInterface(), "DirectEditingMobileInterface")
|
||||
|
||||
webview.setDownloadListener({ url, userAgent, contentDisposition, mimetype, contentLength ->
|
||||
downloadFile(Uri.parse(url))
|
||||
})
|
||||
webview.setDownloadListener { url, _, _, _, _ -> downloadFile(Uri.parse(url)) }
|
||||
|
||||
loadUrl(intent.getStringExtra(ExternalSiteWebView.EXTRA_URL))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue