Skip to content

Commit

Permalink
Merge pull request #12049 from nextcloud/feature/use-m3-SyncedFolderP…
Browse files Browse the repository at this point in the history
…referencesDialogFragment

Use M3 for SyncedFolderPreferencesDialogFragment
  • Loading branch information
AndyScherzinger authored Oct 30, 2023
2 parents f108266 + f016d0b commit 2d6a8c4
Show file tree
Hide file tree
Showing 5 changed files with 602 additions and 681 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,11 @@ class SyncedFoldersActivity :
}
}

override fun onSaveSyncedFolderPreference(syncedFolder: SyncedFolderParcelable) {
override fun onSaveSyncedFolderPreference(syncedFolder: SyncedFolderParcelable?) {
if (syncedFolder == null) {
return
}

// custom folders newly created aren't in the list already,
// so triggering a refresh
if (MediaFolderType.CUSTOM == syncedFolder.type && syncedFolder.id == SyncedFolder.UNPERSISTED_ID) {
Expand Down Expand Up @@ -730,7 +734,11 @@ class SyncedFoldersActivity :
syncedFolderPreferencesDialogFragment = null
}

override fun onDeleteSyncedFolderPreference(syncedFolder: SyncedFolderParcelable) {
override fun onDeleteSyncedFolderPreference(syncedFolder: SyncedFolderParcelable?) {
if (syncedFolder == null) {
return
}

syncedFolderProvider.deleteSyncedFolder(syncedFolder.id)
adapter.removeItem(syncedFolder.section)
}
Expand Down
Loading

0 comments on commit 2d6a8c4

Please sign in to comment.