mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 07:05:49 +03:00
Merge pull request #10481 from nextcloud/fix/share-link-crash
FileActivity: fix crash when creating share link from FileDetailsFragment
This commit is contained in:
commit
97e220a83f
1 changed files with 3 additions and 3 deletions
|
@ -782,7 +782,7 @@ public abstract class FileActivity extends DrawerActivity
|
|||
private void onCreateShareViaLinkOperationFinish(CreateShareViaLinkOperation operation,
|
||||
RemoteOperationResult result) {
|
||||
FileDetailSharingFragment sharingFragment = getShareFileFragment();
|
||||
OCFileListFragment fileListFragment = (OCFileListFragment) getSupportFragmentManager().findFragmentByTag(FileDisplayActivity.TAG_LIST_OF_FILES);
|
||||
final Fragment fileListFragment = getSupportFragmentManager().findFragmentByTag(FileDisplayActivity.TAG_LIST_OF_FILES);
|
||||
|
||||
if (result.isSuccess()) {
|
||||
updateFileFromDB();
|
||||
|
@ -806,8 +806,8 @@ public abstract class FileActivity extends DrawerActivity
|
|||
sharingFragment.onUpdateShareInformation(result, file);
|
||||
}
|
||||
|
||||
if (fileListFragment != null && file != null) {
|
||||
fileListFragment.updateOCFile(file);
|
||||
if (fileListFragment instanceof OCFileListFragment && file != null) {
|
||||
((OCFileListFragment) fileListFragment).updateOCFile(file);
|
||||
}
|
||||
} else {
|
||||
// Detect Failure (403) --> maybe needs password
|
||||
|
|
Loading…
Reference in a new issue