Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ object AppWideNotificationManager {

private const val TAG = "AppWideNotificationManager"

private const val SYNC_CONFLICT_NOTIFICATION_INTENT_REQ_CODE = 16
private const val UPLOAD_LIST_REQUEST_CODE = 16
private const val SYNC_CONFLICT_NOTIFICATION_INTENT_ACTION_REQ_CODE = 17

private const val SYNC_CONFLICT_NOTIFICATION_ID = 112
Expand All @@ -45,7 +45,7 @@ object AppWideNotificationManager {

return PendingIntent.getActivity(
context,
SYNC_CONFLICT_NOTIFICATION_INTENT_REQ_CODE,
UPLOAD_LIST_REQUEST_CODE,
intent,
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,7 @@ class FileDisplayActivity :
listFragmentJustCreated = true
}

// the onResume() following this intent already lists and re-syncs the current directory
browseToRoot(performRefresh = false)
browseToRoot()
}

@SuppressLint("UnsafeIntentLaunch")
Expand Down Expand Up @@ -1068,15 +1067,12 @@ class FileDisplayActivity :
}
}

fun browseToRoot(performRefresh: Boolean = true) {
private fun browseToRoot() {
listOfFilesFragment?.let {
val root = storageManager.getFileByPath(OCFile.ROOT_PATH)
it.resetSearchAttributes()
file = root
if (performRefresh) {
it.listDirectory(root, MainApp.isOnlyOnDevice())
startSyncFolderOperation(root, false)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daniele-verducci let's check startSyncFolderOperation(root, false) is really needed?

}
it.listDirectory(root, MainApp.isOnlyOnDevice())
}

binding.fabMain.setImageResource(R.drawable.ic_plus)
Expand Down
Loading