refactor(front): remove dead code (old Shared section)

This commit is contained in:
Edouard Vanbelle
2026-05-29 12:54:52 +02:00
parent 6e30353c4b
commit ae4fb7603a
8 changed files with 9 additions and 1003 deletions
+2 -6
View File
@@ -18,7 +18,6 @@ import { recent } from '../features/library/recent.js';
import { fileSharing } from '../features/sharing/fileSharing.js';
import { grants } from '../model/grants.js';
import { recentView } from '../views/recent/recentView.js';
import { sharedView } from '../views/shared/sharedView.js';
import { checkAuthentication } from './authSession.js';
import { loadFiles } from './filesView.js';
import {
@@ -700,11 +699,8 @@ function setupEventListeners() {
if (searchDebounceTimer) clearTimeout(searchDebounceTimer);
const query = elements.searchInput?.value.trim();
// In shared section, filter locally
if (app.currentSection === 'shared' && sharedView) {
sharedView.filterAndSortItems();
return;
}
// My Shares section does not support in-page search
if (app.currentSection === 'shared') return;
if (query) {
performSearch(query);
+2 -7
View File
@@ -13,7 +13,6 @@ import { photosView } from '../features/library/photos.js';
import { favoritesView } from '../views/favorites/favoritesView.js';
import { mySharesView } from '../views/myShares/mySharesView.js';
import { recentView } from '../views/recent/recentView.js';
import { sharedView } from '../views/shared/sharedView.js';
import { sharedWithMeView } from '../views/sharedWithMe/sharedWithMeView.js';
import { filesView, loadFiles } from './filesView.js';
import { setActionsBarMode, setGroupByView, syncGroupByMenu } from './main.js';
@@ -166,9 +165,8 @@ function setCurrentSection(section) {
appElements.pageTitle.setAttribute('data-i18n', titleKey);
}
// Hide sharedView and mySharesView when switching to any other section
// Hide mySharesView when switching to any other section
if (section !== 'shared') {
if (sharedView) sharedView.hide();
mySharesView.hide();
}
@@ -301,10 +299,7 @@ function switchToFilesSection() {
ui.updateBreadcrumb();
if (batchToolbar) batchToolbar.clear();
// temp solution
sharedView.loadItems().then(() => {
loadFiles();
});
loadFiles();
}
function switchToFavoritesSection() {