Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Jan 9, 2025
1 parent 07ee2e1 commit 4d32a78
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import com.nextcloud.ui.ChooseAccountDialogFragment;
import com.nextcloud.ui.composeActivity.ComposeActivity;
import com.nextcloud.ui.composeActivity.ComposeDestination;
import com.nextcloud.utils.extensions.ViewExtensionsKt;
import com.nextcloud.utils.mdm.MDMConfig;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
Expand Down Expand Up @@ -1373,4 +1374,8 @@ private void handleNavItemClickEvent(@IdRes int menuItemId) {
Menu navMenu = drawerNavigationView.getMenu();
onNavigationItemClicked(navMenu.findItem(menuItemId));
}

public void showBottomNavigationBar(boolean show) {
ViewExtensionsKt.setVisibleIf(bottomNavigationView, show);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import com.owncloud.android.lib.resources.files.ToggleFavoriteRemoteOperation;
import com.owncloud.android.lib.resources.shares.OCShare;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.ui.activity.DrawerActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.activity.ToolbarActivity;
import com.owncloud.android.ui.adapter.FileDetailTabAdapter;
Expand Down Expand Up @@ -209,6 +210,10 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
throw new IllegalArgumentException("Arguments may not be null");
}

if (getActivity() instanceof DrawerActivity drawerActivity) {
drawerActivity.showBottomNavigationBar(false);
}

setFile(BundleExtensionsKt.getParcelableArgument(arguments, ARG_FILE, OCFile.class));
parentFolder = BundleExtensionsKt.getParcelableArgument(arguments, ARG_PARENT_FOLDER, OCFile.class);
user = BundleExtensionsKt.getParcelableArgument(arguments, ARG_USER, User.class);
Expand Down Expand Up @@ -268,6 +273,14 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
}
}

@Override
public void onDestroy() {
if (getActivity() instanceof DrawerActivity drawerActivity) {
drawerActivity.showBottomNavigationBar(true);
}
super.onDestroy();
}

private void onOverflowIconClicked() {
final OCFile file = getFile();
final List<Integer> additionalFilter = new ArrayList<>(
Expand Down

0 comments on commit 4d32a78

Please sign in to comment.