onedirve and google drive

This commit is contained in:
Courtney Arnold 2026-08-14 17:30:31 -05:00
parent a9bcec09b1
commit 901ec678a3
12 changed files with 373 additions and 29 deletions

View file

@ -9,9 +9,12 @@ enum _BrowseRoot { myFiles, sharedWithMe }
/// Lets the user navigate whichever cloud storage provider is connected —
/// their own files, and (if the provider supports it) files others have
/// shared with them — and pick a parent location. Confirming looks for (or
/// creates) the `MO-Fuel-Tax-Back` folder under that location, so two
/// people pointing at the same shared parent converge on the same app
/// folder, regardless of which provider each of them is using.
/// creates) the `Show Me The Fuel Refund` folder under that location, so
/// two people pointing at the same shared parent converge on the same app
/// folder, regardless of which provider each of them is using. Picking a
/// folder that's already named that directly (e.g. a shared folder set up
/// by someone else) uses it as-is instead of nesting another one inside —
/// see `CloudSyncService.selectAppFolder`.
class CloudFolderBrowserScreen extends StatefulWidget {
const CloudFolderBrowserScreen({super.key});
@ -54,6 +57,12 @@ class _CloudFolderBrowserScreenState extends State<CloudFolderBrowserScreen> {
return null;
}
/// The currently browsed-into folder's own name, so [_useThisFolder] can
/// tell whether the user picked a folder already named
/// `Show Me The Fuel Refund` — null at a virtual root ("My Files"),
/// which is never itself named that.
String? get _currentFolderName => _pathStack.isNotEmpty ? _pathStack.last.name : null;
String get _breadcrumbPath =>
([_rootLabel] + _pathStack.map((f) => f.name).toList()).join(' / ');
@ -121,6 +130,7 @@ class _CloudFolderBrowserScreenState extends State<CloudFolderBrowserScreen> {
await context.read<AppState>().chooseCloudFolder(
parentId: parentId,
breadcrumbPath: _breadcrumbPath,
currentFolderName: _currentFolderName,
);
if (mounted) Navigator.of(context).pop();
} catch (e) {