feat: account switching

This commit is contained in:
2023-04-19 13:10:41 +01:00
parent 9dacad430a
commit e5b215abb5
19 changed files with 310 additions and 400 deletions

View File

@ -185,8 +185,12 @@ const GlobalTab = () => {
};
const PostsTab = () => {
const { follows } = useLogin();
const subject: TimelineSubject = { type: "pubkey", items: follows.item, discriminator: "follows" };
const { follows, publicKey } = useLogin();
const subject: TimelineSubject = {
type: "pubkey",
items: follows.item,
discriminator: `follows:${publicKey?.slice(0, 12)}`,
};
return (
<>
@ -197,8 +201,12 @@ const PostsTab = () => {
};
const ConversationsTab = () => {
const { follows } = useLogin();
const subject: TimelineSubject = { type: "pubkey", items: follows.item, discriminator: "follows" };
const { follows, publicKey } = useLogin();
const subject: TimelineSubject = {
type: "pubkey",
items: follows.item,
discriminator: `follows:${publicKey?.slice(0, 12)}`,
};
return <Timeline subject={subject} postsOnly={false} method={"TIME_RANGE"} window={undefined} relay={undefined} />;
};