mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
Fixed problem of not disconnecting Websocket when logging out
This commit is contained in:
parent
c234c95880
commit
75b1ed08b4
2 changed files with 46 additions and 47 deletions
|
@ -51,7 +51,8 @@ class ImageViewerPage extends HookConsumerWidget {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
body: Center(
|
body: SafeArea(
|
||||||
|
child: Center(
|
||||||
child: Hero(
|
child: Hero(
|
||||||
tag: heroTag,
|
tag: heroTag,
|
||||||
child: CachedNetworkImage(
|
child: CachedNetworkImage(
|
||||||
|
@ -81,9 +82,6 @@ class ImageViewerPage extends HookConsumerWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// imageBuilder: (context, imageProvider) {
|
|
||||||
// return PhotoView(imageProvider: imageProvider);
|
|
||||||
// },
|
|
||||||
placeholder: (context, url) {
|
placeholder: (context, url) {
|
||||||
return CachedNetworkImage(
|
return CachedNetworkImage(
|
||||||
cacheKey: thumbnailUrl,
|
cacheKey: thumbnailUrl,
|
||||||
|
@ -104,6 +102,7 @@ class ImageViewerPage extends HookConsumerWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ class WebsocketNotifier extends StateNotifier<WebscoketState> {
|
||||||
final Ref ref;
|
final Ref ref;
|
||||||
|
|
||||||
connect() {
|
connect() {
|
||||||
var authenticationState = ref.watch(authenticationProvider);
|
var authenticationState = ref.read(authenticationProvider);
|
||||||
|
|
||||||
if (authenticationState.isAuthenticated) {
|
if (authenticationState.isAuthenticated) {
|
||||||
var accessToken = Hive.box(userInfoBox).get(accessTokenKey);
|
var accessToken = Hive.box(userInfoBox).get(accessTokenKey);
|
||||||
|
|
Loading…
Reference in a new issue