diff options
author | crupest <crupest@outlook.com> | 2020-08-07 22:51:33 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-07 22:51:33 +0800 |
commit | bace0870ee294e44d0112ba49de12b27fa3c0a31 (patch) | |
tree | 0e4765eceb082ede3dfe5cd7a274803b5c723495 /Timeline/ClientApp/src | |
parent | 87e87e6f93ed1dc3f4c1e0fd312a95e17d8162fc (diff) | |
download | timeline-bace0870ee294e44d0112ba49de12b27fa3c0a31.tar.gz timeline-bace0870ee294e44d0112ba49de12b27fa3c0a31.tar.bz2 timeline-bace0870ee294e44d0112ba49de12b27fa3c0a31.zip |
Fix a bug in user.
Diffstat (limited to 'Timeline/ClientApp/src')
-rw-r--r-- | Timeline/ClientApp/src/app/data/user.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Timeline/ClientApp/src/app/data/user.ts b/Timeline/ClientApp/src/app/data/user.ts index defcb4e4..1d2d6f88 100644 --- a/Timeline/ClientApp/src/app/data/user.ts +++ b/Timeline/ClientApp/src/app/data/user.ts @@ -7,6 +7,7 @@ import { pushAlert } from '../common/alert-service'; import { dataStorage } from './common';
import { SubscriptionHub, ISubscriptionHub } from './SubscriptionHub';
+import { queue } from './queue';
import { HttpNetworkError, BlobWithEtag, NotModified } from '../http/common';
import {
@@ -18,7 +19,6 @@ import { HttpUserNotExistError,
HttpUser,
} from '../http/user';
-import { queue } from './queue';
export type User = HttpUser;
@@ -252,7 +252,7 @@ export class UserInfoService { const cache = await dataStorage.getItem<BlobWithEtag | null>(key);
if (cache == null) {
try {
- const avatar = await getHttpUserClient().getAvatar(key);
+ const avatar = await getHttpUserClient().getAvatar(username);
await dataStorage.setItem<BlobWithEtag>(key, avatar);
return {
data: avatar.data,
@@ -267,7 +267,7 @@ export class UserInfoService { }
} else {
try {
- const res = await getHttpUserClient().getAvatar(key, cache.etag);
+ const res = await getHttpUserClient().getAvatar(username, cache.etag);
if (res instanceof NotModified) {
return {
data: cache.data,
|