Closed chrisbobbe closed 6 months ago
Thanks!
I was a bit surprised we don't have the feature level right after login — after all, we just learned it from the server settings. But reading getZulipFeatureLevel
and following references, this comment (in getServerVersion
) explains it:
// Oh, and there's one other case where an Account record will lack this
// data: immediately after login, before we complete the first initial
// fetch. That's fixable, though: we already have the version from
// server_settings when we enter the login flow, so we just need to
// remember that value and stick it in the initial Account record.
In zulip-flutter, we already use that information to have a feature level from the beginning right after login. (OTOH we don't yet update it on register, as zulip-mobile does; that's https://github.com/zulip/zulip-flutter/issues/458 .)
Anyway, this all LGTM — merging.
Sentry is reminding us that we forgot to check if the active account has server data. Adding this check fixes a crash when
zulipFeatureLevel
is null because of not having server data right after login.