feat: hyperlinks, group seen-by for all, profile-pic preview, in-call invite fix + desktop update progress (0.1.6)
- #1: URLs in chat are now clickable links (open externally on desktop). - #2: group 'Seen by X, Y +N more' now shows under the LATEST message to EVERYONE (server computes reads for all messages; click shows the names). - #5: tapping the conversation-header avatar previews the DP/group photo full-size. - #4: in-call invite lists only people you've messaged, excludes those already in the call/invited, and the Invite button is sticky. - #3 (0.1.6 shell): auto-updater emits checking/available/downloading/ready/error to the web UI, which shows a progress banner (+ Restart button) so updates aren't silent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,8 @@ ipcMain.handle('check-updates', async () => {
|
||||
return (v && v !== current) ? { status: 'available', version: v, current } : { status: 'current', current };
|
||||
} catch (e) { return { status: 'error', message: String((e && e.message) || e), current }; }
|
||||
});
|
||||
// #3: restart-and-install, triggered from the web update banner's "Restart" button.
|
||||
ipcMain.handle('restart-to-update', () => { try { if (autoUpdater) autoUpdater.quitAndInstall(); } catch (_) {} });
|
||||
// Chat toast: sender/group avatar + message; clicking it raises the app and opens that chat.
|
||||
// Uses Electron's OWN Notification (native, no SnoreToast) whose 'click' event fires reliably.
|
||||
const APP_ID = 'com.bizgaze.connect.desktop';
|
||||
@@ -236,10 +238,19 @@ app.whenReady().then(() => {
|
||||
app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) createWindow(); });
|
||||
// Check for shell updates on launch, then every 6 hours. Only in packaged builds.
|
||||
if (app.isPackaged && autoUpdater) {
|
||||
// #3: surface update progress to the web UI so the user can SEE an update is downloading /
|
||||
// installing, instead of it happening silently in the background.
|
||||
const sendUpdate = (data) => { try { if (win && !win.isDestroyed()) win.webContents.send('update-event', data); } catch (_) {} };
|
||||
autoUpdater.on('checking-for-update', () => sendUpdate({ phase: 'checking' }));
|
||||
autoUpdater.on('update-available', (info) => sendUpdate({ phase: 'available', version: info && info.version }));
|
||||
autoUpdater.on('update-not-available', () => sendUpdate({ phase: 'current' }));
|
||||
autoUpdater.on('download-progress', (p) => sendUpdate({ phase: 'downloading', percent: Math.round((p && p.percent) || 0) }));
|
||||
autoUpdater.on('error', () => sendUpdate({ phase: 'error' }));
|
||||
// When an update finishes downloading (auto or via the Settings "Check for updates"), offer a
|
||||
// clear restart prompt instead of only the silent on-next-launch install.
|
||||
let promptedForUpdate = false;
|
||||
autoUpdater.on('update-downloaded', async (info) => {
|
||||
sendUpdate({ phase: 'ready', version: info && info.version });
|
||||
if (promptedForUpdate) return; promptedForUpdate = true;
|
||||
try {
|
||||
const { dialog } = require('electron');
|
||||
|
||||
Reference in New Issue
Block a user