Fix crash after login

This commit is contained in:
Mikko Ahlroth 2023-10-28 20:23:31 +03:00
parent d157dc0ee6
commit eb8b6df527

View file

@ -162,6 +162,8 @@ fn logged_in(model: Model, token: String, session: login_token.Session) {
device: auth_models.Device(name: model.login_view.device_name), device: auth_models.Device(name: model.login_view.device_name),
) )
let #(m, e) = authed_view.init(auth_data)
case case
auth_storage.write( auth_storage.write(
model.auth_storage, model.auth_storage,
@ -180,7 +182,8 @@ fn logged_in(model: Model, token: String, session: login_token.Session) {
..model, ..model,
auth_data: option.Some(auth_data), auth_data: option.Some(auth_data),
current_view: view.AuthedView, current_view: view.AuthedView,
authed_view: option.Some(m),
), ),
effect.none(), effect.map(e, AuthedView),
) )
} }