5 Commits

Author SHA1 Message Date
Imran Remtulla
05dd135665 Unify form input styling: global borderless filled theme, rename Settings* components to generic names, merge settings_widgets.dart into ui_widgets.dart, convert SegmentedButtons to DropdownMenus, add per-app checkbox bulk update dialog, compact SliverAppBars, inline trailing icon buttons, newline-terminated error messages for breathing room, ConnectedCard defaults to zero padding (#3107, #3100) 2026-07-17 21:33:26 +01:00
Imran Remtulla
12db58050d feat: group apps by source, plus grouped-list and FAB polish
- Replace the 'Group by category' toggle with a 'Group by' control
  (None/Category/Source); sources are listed alphabetically. Migrates the
  old groupByCategory setting.
- Give grouped entries small gaps so they read as distinct positional
  tiles, and make the multi-select/pinned highlight follow each tile's
  positional (or card) corners instead of the default radius.
- Make the multi-select 'more' FAB extended to match the Add FAB.
- Expose FAB shadow via floatingActionButtonTheme elevation in theme.dart.
2026-07-02 22:44:21 +01:00
Imran
f85d9206c7 Rearchitect (#3002)
* architecture: consolidate and simplify

- Collapse 14 directories into 4 (app_sources, components, pages, providers)
- Replace DI container with inline construction in main.dart
- Fold page controllers back into their pages (one file per screen)
- Merge small files into their natural homes (removing 40 files)
- Standardize error handling across all 28 app sources (rethrowOrWrapError)
- Make App immutable with copyWith() replacing deepCopy()
- Replace globalNavigatorKey with go_router
- Add error boundaries, source health monitor, typed settings
- Eliminate all silent catch blocks
- Add tests and CI pipeline
- Extend lint rules

97 files → 56 files. 0 errors, 4/4 tests passing.

* fix: remove unused go_router, restore internal navigation

- Drop go_router (ShellRoute broke tab switching and disabled the
  tablet/TV two-pane layout); revert to MaterialApp + navigatorKey
- Move appNavigatorKey into main.dart; delete router.dart
- Remove HomePage.child branch so the internal switcher drives the UI
- Fix dead 'Restart' button in the error fallback screen
- Remove TypedSettings []= mutation backdoor
- Persist clamped preferredApkIndex to the in-memory app map
- Use settings.getBool('trackOnly') instead of raw map access

* fix: remove dead rethrowOrWrapError, add missing import, update stale comments and docs

* fix: satisfy lint rules, wrap fire-and-forget futures, drop unused CI

- Fix use_build_context_synchronously via mounted/context.mounted guards
- Wrap deliberate fire-and-forget futures in unawaited()
- Document static app-lifetime event bus for close_sinks
- Apply dart format and dart fix across the codebase
- Drop avoid_catches_without_on_clauses (noisy in source scrapers)
- Remove test.yml CI workflow
- Rename test/services to test/providers

* fix: show real HTTP error messages, remove source health monitor and dead event-bus code

- Bypass deferred localization for HTTP_ERROR so the real reason phrase/status is shown instead of a generic 'unexpected error'
- Remove SourceHealthMonitor entirely (per-instance state made it ineffective for background checks)
- Simplify save-notification bus to StreamController<void>; drop unused AppRepositoryEvent/AppRepositoryEventType and events getter
- Scrub stale docs (SourceHealthMonitor, event type, deleted test.yml workflow)

* fix: preserve installedVersion on import, correct stale theme doc reference

* fix: type logger as Logger?, simplify ErrorWidget builder, document _sentinel, resolve TextDirection conflict

- Change dynamic logger to Logger? in AppsProvider for type safety (the
  field was unused but the contract should be explicit).
- Replace MaterialApp wrapper in ErrorWidget.builder with a minimal
  Directionality + Scaffold; MaterialApp is wasteful for a one-shot
  error screen.
- Add a doc comment explaining the _sentinel pattern used by
  App.copyWith to distinguish unset from explicitly-null nullable fields.
- Hide TextDirection from easy_localization (which re-exports intl's
  conflicting TextDirection enum that lacks ltr/rtl) so the Flutter
  dart:ui TextDirection.ltr resolves correctly.

* fix: register SourceForge, restore Palestine banner, drop dead code and tests

- Register the implemented SourceForge source in _buildSources() so the
  README's supported-sources list is accurate.
- Restore the Support Palestine banner in README.md (unintentionally removed).
- Remove unused ConfigProvider, CredentialHealth, getCredentialHealth, and
  the never-injected _configProvider path from settings_provider.
- Remove unit tests and their test-only dev dependencies.
2026-07-02 01:58:45 +01:00
Imran Remtulla
f514a37a31 fix: squash bugs, simplify code, clean comments, update docs
Bugs fixed:
- main.dart: await bgUpdateCheck in onStart (was fire-and-forget)
- github.dart: fix wrong array index in verifyLatestTag fallback (releases[0] -> releases[releases.length-1])
- category_editor: add didUpdateWidget to sync stale selected state
- apkpure.dart: handle null version_name in fold; fix stayOneVersionBehind broken without fallbackToOlderReleases
- neutroncode.dart: rewrite date parsing to handle month-first formats correctly; use DateTime.tryParse
- huaweiappgallery: replace assert with runtime fallback for overridden hosts
- uptodown.dart: fix dead second date format (try/catch per format)
- vivoappstore.dart: add missing ? null-safe operator on json['data']
- app.dart: disable remove button when app is null; add mounted check after await
- custom_errors.dart: override CheckUpdatesException.toString() to show actual errors
- InstallError: remove broken .substring(7) on enum name
- Google verification warning: remove year-2026 gate
- apps.dart: fix catchError return type mismatch; add missing SilentUpdateAttemptNotification cancel
- add_app.dart: remove dead unreachable ternary branch

Simplifications:
- apps_provider_install: replace Map<Object?,Object?> with typed _InstallResult class
- source_provider: flatten _resolveAppId 7-deep ?? chain into early returns; defensive copy additionalSettings before mutation
- settings_provider: migrate legacy exportSetting bool->int in init, simplify getter
- apps_provider: decompose 4-level nested ternary in bgUpdateCheck
- izzyondroid: replace try/catch flow control with host-based branching
- githubstars: create SettingsProvider once per import, not per page
- direct_apk_link: set versionDetectionDisallowed, decouple from hardcoded type check
- main.dart: guard against duplicate listener registration
- settings.dart: move init out of build() into postFrameCallback
- apps.dart: inline one-line _showMoreOptions wrapper
- github.dart: fix prerrelsSkipped typo; add doc to _fetchReleaseDetails
- apkmirror.dart: remove redundant tautology in null check

Comments & docs:
- Add file headers to custom_errors, theme, main_fdroid, native_provider, motion, ui_shapes
- Condense verbose comments in generated_form, itchio, liteapks
- Fix custom_app_bar inaccurate collapse comment
- Move coolapk maintenance note to class-level doc
- Fix html.dart triple negative boolean expression
- Add doc to loadTranslations; add comments to _ObtainiumState vars
- Fix custom_app_bar inaccurate comment
- Add TODO comments to theme.dart deprecated year2023 usage
- Restore // ignore: comments for known analyzer false-positive
- README: add SourceForge, explain Track-Only, fix badge URL, mention F-Droid flavor
2026-07-01 11:28:07 +01:00
Imran Remtulla
8eb2f092c2 Refactor: fix bugs, extract helpers, improve code structure
Bugs fixed:
- hashListOfLists double-hashing (sha256.hex.hashCode losing 224 bits)
- undrained HTTP response streams in downloadFile/checkETagHeader
- destructive useMaterialYou setter (removed unused getter/setter)
- 5 bare .endsWith('.apk') replaced with AppSource.isApkOrContainerFile
- fire-and-forget async IIFE in AppsProvider constructor missing error handling

Refactors:
- Extracted appJSONCompatibilityModifiers into 6 named sub-migration helpers
- Split bgUpdateCheck: extracted _bgRunUpdateCheck helper (~170 lines)
- Moved showMessage/showError from custom_errors.dart to components/ui_widgets.dart
- Replaced 'source is! HTML && source is! SourceForge' with AppSource.suppressStandardVersionExtraction flag
- Extracted buildObtainiumTheme to new lib/theme.dart
- Cleaned up BG workaround TODO, verbose comments, docs errors
2026-06-30 17:44:55 +01:00