The widget is not recreated correctly when videoPlayName changes, which
can cause weird behaviour with hooks and timers (like timers not firing
when they should do). Using a key forces flutter to recreate the widget
properly and allow the assumptions in build to work correctly.
* fix(mobile): don't update search filters in-place
Search filters are currently modified in-place, which can feel quite
janky. The chips behind the bottom sheet update instantly, and the
search page gets confused because filters have been applied but no
search has been initiated. Filters should keep their own copy of the
filter when they're opened, and the commit + search on apply.
The previous filter and pre-filter concepts were also cleaned up. They
added complexity, and `search()` now owns the full life cycle of the
filter.
This now also reverts the changes from #27155, as this solution should
be cleaner.
* refactor & color tweak
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
3 seconds is too long for some people, and it can be confusing to see
the video not playing and no indication that it's buffering. Reducing
the duration of the timer should show the spinner faster and prevent
confusion.
Co-authored-by: Alex <alex.tran1502@gmail.com>
fix(mobile): reset video controls hide timer when showing controls changes
The hide timer currently only resets when the status of the video
changes, but does not account for when the controls change. This means
that two things happen:
1. The hide timer does not reset when the controls become visible
again, the controls will stay visible forever or until the playback
status changes.
2. The hide timer will fire too quickly, and will hide the controls
much sooner than 5 seconds if the controls are hidden and then shown
again before the hide timer fires.
At current, the controls for videos are always hidden when opening an
asset from the timeline, and when swiping between assets. The latter is
actually quite annoying, so it would be better UX if video controls were
hidden when opening from the timeline like before, but visibility of the
controls was retained when swiping between assets.
These toasts can sometimes cover UI elements and make them impossible to
interact with until they are dismissed. Specifically, deleting an asset
will show a toast over the video controls and prevent seeking.
* refactor listener tracking for image stream completers and fix early cancel call
* fix: improve cache listener identification in image stream tracking
* add documentation and test cases for listener tracking in ImageStreamCompleter
* fix: remove unnecessary image provision flag from listener tracking
* fix: override setImage method in cache aware listener tracker mixin
* fix: rename test file
The spacing was required for the old slider, but the new one has its own
spacing and makes it redundant. There is too much now, and we've
received feedback that it should be less sparse. The default track
height of 16px is an improvement over the old track height, but it is
very thick. A middleground of 12px might be better.
* fix(mobile): option padding on search dropdowns
* chore: prevent height fill up screen and block the bottom menu entry
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* feat(mobile): open in browser
* chore: open in browser instead of webview
* chore: allow archived asset
* fix: moved openinbrowser above unstack
* feat: deeplink into favorites, trash & archived
* fix: use remoteId (for tests to succeed)
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
* use cookiejar
* cookie duping hook
* remove old pref
* handle network switching on logout
* remove bootstrapCookies
* dead code
* fix cast
* use constants
* use new event name
* update api
* Add support for showing animated images in AssetViewer with AnimatedImageStreamCompleter
* Add GIF overlay to thumbnail tile for animated assets
* formatting
* require isAnimated parameter in image providers for better asset handling
* feat: refactor AnimatedImageStreamCompleter to use streams for codec loading and initial image handling
* formatting
* add isAnimatedImage property to BaseAsset
* remove ApiService.getRequestHeaders() usage
* feat(mobile): use material design 3 slider
The new slider is easier to use, and looks more modern.
* chore: add shadow to button and text for better visibility
---------
Co-authored-by: Alex <alex.tran1502@gmail.com>
The numbers in the backup page are not monospace, and so changes cause
the layout to shift. Using tabular figures (monospace) will prevent
that.
Refs: #25021
Videos have recently been changed to support zooming, but this can make
the controls in the centre of the screen unergonomic as they will either
stay in the centre when dismissing, or stick to the video when zooming.
Neither is great. We should align the behaviour with other apps which
has the play/pause toggle at the bottom of the screen with the seeker
bar instead.
Co-authored-by: Alex <alex.tran1502@gmail.com>
* fix(mobile): correct local asset dimensions
We are constraining the size of videos so that they play nicely with
hero animations, and don't stretch in weird ways. This however caused a
regression as we are not account for local assets on Android which have
un-oriented dimensions.
* post-orientation width and height in local sync
* migration
* no need to handle it in asset viewer
---------
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
Search results use a different provider than the main timeline, and they
appear appear to have diverged a bit. This means that assets can
sometimes look wrong or different in search compared to the main
timeline or albums.
The background of the photo view does not extend below the height of the
viewport, and so the asset details fade in over black with the photo
view, and the standard surface colour scheme of the scaffold for the
rest. This leads to a janky animation. We can't change the background of
the scaffold to black, as it in turn makes the iOS bouncing scroll
physics cut off incorrectly. The best fix is to remove background
decoration from the photo view, and defer to the parent to colour the
background.
Co-authored-by: Alex <alex.tran1502@gmail.com>
Search results are replaced with a spinner when loading the next page,
which is quite jarring. Search results now remain visible when loading
the next page with a spinner at the bottom. The next page also loads
sooner, which makes it feel a lot smoother.
Co-authored-by: Alex <alex.tran1502@gmail.com>
In order to scroll smoothly without interfering with the gesture
detector on the photo view, we have an offstate scroll view which we
defer all drags to, and then forward scroll offsets to the real scroll
controller. This works well, but it can be simpler. Instead, we can
create a custom scroll controller on a scroll view with never scrollable
physics, and then forward drag events to that, bypassing the need for a
proxy scroll controller.
Co-authored-by: Alex <alex.tran1502@gmail.com>
Consolidate video state into a single asset-scoped provider, and reduce
dependency on global state generally. Overall this should fix a few
timing issues and race conditions with videos specifically, and make
future changes in this area easier.
The image in the photo view has no height, and is therefore entirely
unconstrained. This causes the image to take up the full height of the
viewport during the hero animation, which can make look out of sync. In
some other cases, it can stretch or resize the image to fill the entire
viewport.