Fix pull-to-refresh, header tint, sheet controls, and Shares tap
- Every tab's RefreshIndicator+CustomScrollView was missing an explicit AlwaysScrollableScrollPhysics, so pull-to-refresh silently couldn't be triggered once the list was short enough to fit the viewport (empty, or a single item) - the platform default physics only allows the overscroll drag RefreshIndicator listens for once content overflows. - StickyHeaderDelegate (Files'/Photos'/Favorites' pinned controls row) painted its background from Theme.of(context).colorScheme.surface - Flutter's own Material 3 scheme, reseeded by the user's accent color choice - instead of context.nooColors.bg like the rest of the screen, showing as a stray colored cast behind the row. - NooSegmentedControl gains onSurface: true wherever one sits inside a sheet (Files'/Photos' sort and type-filter controls) - it defaulted to the same surface fill as the sheet itself, so the control had no visible boundary showing it as a grouped unit. - Shares tab: removed the per-row "..." overflow menu on every scope (With you/By you/Links); tapping a row now opens the full Share sheet for that item instead, fetched via the new FilesController.fetchItemAtPath (a share only carries enough metadata for its own row, not what the sheet's header needs). - fetchShares() now reuses _shareFromJson instead of its own thinner inline parser, so url/token/permissions/expireDate are actually populated - a public-link share could never show "Copy link" before. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -109,6 +109,7 @@ class FilesControlsRow extends StatelessWidget {
|
||||
children: [
|
||||
NooSegmentedControl<bool>(
|
||||
fill: true,
|
||||
onSurface: true,
|
||||
value: files.sortAscendingFor(folderPath),
|
||||
onChanged: (asc) {
|
||||
if (asc != files.sortAscendingFor(folderPath)) {
|
||||
@@ -172,6 +173,7 @@ class FilesControlsRow extends StatelessWidget {
|
||||
// the two screens' filter sheets look and behave the same.
|
||||
NooSegmentedControl<FilesTypeFilter>(
|
||||
fill: true,
|
||||
onSurface: true,
|
||||
labelOnlySelected: true,
|
||||
value: files.filesTypeFilter,
|
||||
onChanged: files.setFilesTypeFilter,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../theme/design_tokens.dart';
|
||||
|
||||
/// Wraps [child] as a sliver that pins to the top of the scroll view when
|
||||
/// used with `SliverPersistentHeader(pinned: true, ...)`, or scrolls away
|
||||
@@ -24,7 +25,23 @@ class StickyHeaderDelegate extends SliverPersistentHeaderDelegate {
|
||||
double shrinkOffset,
|
||||
bool overlapsContent,
|
||||
) {
|
||||
return Material(color: Theme.of(context).colorScheme.surface, child: child);
|
||||
// `context.nooColors.bg`, not `Theme.of(context).colorScheme.surface` -
|
||||
// the latter is Flutter's own Material 3 scheme, seeded from the user's
|
||||
// accent color choice (see AppTheme.light/dark), so it carried a faint
|
||||
// hue of whatever accent is picked, and didn't match the plain
|
||||
// `colors.bg` every one of these screens' own `ColoredBox` background
|
||||
// uses. `bg`, not `surface`, so the sort/filter chips and List/Grid
|
||||
// toggle riding on top of this (each already `colors.surface`-filled)
|
||||
// still pop against it, the same as they do everywhere else in the app
|
||||
// - matching `surface` here would make this pinned header the one place
|
||||
// they'd flatten into their background instead. `surfaceTintColor:
|
||||
// Colors.transparent` guards against the same M3 elevation-tint
|
||||
// behavior even if this ever gets a non-zero elevation.
|
||||
return Material(
|
||||
color: context.nooColors.bg,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user