Skip to content

Conversation

@uhthomas
Copy link
Collaborator

@uhthomas uhthomas commented Jan 29, 2026

Description

If the version check feature is disabled, the server will currently send stale data to the client. In addition to no longer sending stale data, the client should also not show the latest version if the feature is disabled.

This complements the server PR #25688.

How Has This Been Tested?

I commented out this line in mobile/lib/providers/websocket.provider.dart:

_ref.read(serverInfoProvider.notifier).handleReleaseInfo(serverVersion, releaseVersion);

then ran the app. The row was not present. With that line, it is.

Screenshots (if appropriate)

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

N/A

child: Text(
serverInfoState.latestVersion.major > 0
? "${serverInfoState.latestVersion.major}.${serverInfoState.latestVersion.minor}.${serverInfoState.latestVersion.patch}"
serverInfoState.latestVersion!.major > 0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised this was needed - I thought flutter/dart would know that it's safe given the above guard.

@uhthomas uhthomas force-pushed the uhthomas/mobile-hide-latest-version branch from f9dad52 to 63a2cb4 Compare January 29, 2026 20:00
@uhthomas uhthomas changed the title feat(mobile): hide latest version if disabled fix(mobile): hide latest version if disabled Jan 29, 2026
@uhthomas
Copy link
Collaborator Author

As mentioned in Discord, I think this is okay? We could also just leave it as is and move the check for the major version > 0 up a bit.

@bwees

This comment was marked as resolved.

@uhthomas

This comment was marked as resolved.

@uhthomas uhthomas force-pushed the uhthomas/mobile-hide-latest-version branch 3 times, most recently from 5a5916f to d93f4d3 Compare January 29, 2026 22:44
@shenlong-tanwen
Copy link
Member

Yeah, that's fair enough, I did ask in the Discord and happy to discuss further. The README still suggests fvm, so if that's no longer recommended, I guess we should update that. The Makefile didn't work for me at all without this. I can remove it.

Can we move all the build related changes to it's own PR and keep this scoped to the version changes?

@uhthomas
Copy link
Collaborator Author

You got it @shenlong-tanwen - give me a bit and I will put that in a different PR.

If the version check feature is disabled, the server will currently send
stale data to the client. In addition to no longer sending stale data,
the client should also not show the latest version if the feature is
disabled.

This complements the server PR #25688.
@uhthomas uhthomas force-pushed the uhthomas/mobile-hide-latest-version branch from d93f4d3 to 9b9aa4a Compare January 30, 2026 03:22
@alextran1502 alextran1502 force-pushed the uhthomas/mobile-hide-latest-version branch from 858cb5f to ee58869 Compare January 30, 2026 16:10
@alextran1502 alextran1502 enabled auto-merge (squash) January 30, 2026 16:15
@alextran1502 alextran1502 merged commit 8558175 into main Jan 30, 2026
52 checks passed
@alextran1502 alextran1502 deleted the uhthomas/mobile-hide-latest-version branch January 30, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants