chore: removed sync engine since we go for filesystem based syncing

This commit is contained in:
2026-02-14 18:15:28 +01:00
parent daac97824d
commit 34eb0d3781
17 changed files with 766 additions and 838 deletions

View File

@@ -29,9 +29,6 @@ const App: React.FC = () => {
removeMedia,
setTasks,
updateTask,
setSyncStatus,
setSyncConfigured,
setPendingChanges,
setLoading,
toggleSidebar,
togglePanel,
@@ -74,16 +71,6 @@ const App: React.FC = () => {
}
}
// Check sync status
const syncConfigured = await window.electronAPI?.sync.isConfigured();
setSyncConfigured(syncConfigured || false);
// Get pending changes count
const pending = await window.electronAPI?.sync.getPendingCount();
if (pending) {
setPendingChanges(pending);
}
// Load tasks
const tasks = await window.electronAPI?.tasks.getAll();
if (tasks) {
@@ -162,36 +149,6 @@ const App: React.FC = () => {
}) || (() => {})
);
// Sync events
unsubscribers.push(
window.electronAPI?.on('sync:started', () => {
setSyncStatus('syncing');
showToast.loading('Syncing...');
}) || (() => {})
);
unsubscribers.push(
window.electronAPI?.on('sync:completed', async () => {
setSyncStatus('idle');
showToast.dismiss();
showToast.success('Sync completed');
const pending = await window.electronAPI?.sync.getPendingCount();
if (pending) {
setPendingChanges(pending);
}
}) || (() => {})
);
unsubscribers.push(
window.electronAPI?.on('sync:failed', (errorMsg: unknown) => {
setSyncStatus('error');
showToast.dismiss();
const message = typeof errorMsg === 'string' && errorMsg ? errorMsg : 'Unknown error';
showToast.error(`Sync failed: ${message}`);
console.error('Sync failed:', message);
}) || (() => {})
);
// Task events
unsubscribers.push(
window.electronAPI?.on('task:started', (task: unknown) => {
@@ -267,30 +224,6 @@ const App: React.FC = () => {
}) || (() => {})
);
unsubscribers.push(
window.electronAPI?.on('menu:syncNow', () => {
window.electronAPI?.sync.start('bidirectional');
}) || (() => {})
);
unsubscribers.push(
window.electronAPI?.on('menu:pushChanges', () => {
window.electronAPI?.sync.start('push');
}) || (() => {})
);
unsubscribers.push(
window.electronAPI?.on('menu:pullChanges', () => {
window.electronAPI?.sync.start('pull');
}) || (() => {})
);
unsubscribers.push(
window.electronAPI?.on('menu:configureSync', () => {
openTab({ type: 'settings', id: 'settings', isTransient: false });
}) || (() => {})
);
// Rebuild events - clear store on start, reload on complete
unsubscribers.push(
window.electronAPI?.on('posts:rebuildStarted', () => {