mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 01:50:30 +00:00
fix(ui): card chip spacing, instant flag clearing, locale-wide label
- Space the update chip off the card title to match the detail header - Clear the extension's update flag right after a successful upgrade so the chip disappears without waiting for the background re-check - Use the concise Update label across all locales
This commit is contained in:
1 parent
fac17b0ccc
commit
e779de285d
21 files changed
+25
-20
No files matched your search
@@ -243,6 +243,9 @@ class ExtensionsController extends AsyncNotifier<ExtensionsState> {
|
||||
await _runBusy(extension.identity, () async {
|
||||
await ref.read(gopeedServiceProvider).updateExtension(extension.identity);
|
||||
await loadInstalled(refreshUpdates: false);
|
||||
// Drop the stale flag immediately; the background re-check confirms it.
|
||||
final flags = Map<String, String>.of(_current.updateFlags)..remove(extension.identity);
|
||||
state = AsyncValue.data(_current.copyWith(updateFlags: flags));
|
||||
unawaited(checkUpdate());
|
||||
_bumpStoreInstallCount(extension.identity);
|
||||
_reportInstallSafe(extension.identity);
|
||||
|
||||
@@ -993,7 +993,8 @@ class _ExtensionCard extends ConsumerWidget {
|
||||
style: TextStyle(color: palette.textPrimary, fontSize: 14, fontWeight: FontWeight.w700),
|
||||
),
|
||||
),
|
||||
if (canUpdate && installed != null)
|
||||
if (canUpdate && installed != null) ...[
|
||||
const SizedBox(width: 8),
|
||||
Flexible(
|
||||
child: ExtensionUpdateStatus(
|
||||
key: ValueKey('extension-card-update-status-${item.id}'),
|
||||
@@ -1001,6 +1002,7 @@ class _ExtensionCard extends ConsumerWidget {
|
||||
onTap: busy ? null : () => showExtensionUpdateDialog(context, installed),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
|
||||
Reference in new issue
Block a user