2023-08-28 17:58:05 +00:00
|
|
|
import { PublicKey } from "../lib/nostr-ts/key.ts";
|
2023-07-14 10:59:25 +00:00
|
|
|
import { ProfileData } from "../features/profile.ts";
|
2023-06-30 14:05:57 +00:00
|
|
|
|
2023-10-06 00:05:35 +00:00
|
|
|
export type SearchUpdate = Cancel | SelectConversation | Start;
|
2023-06-30 14:05:57 +00:00
|
|
|
export type Start = {
|
|
|
|
type: "StartSearch";
|
|
|
|
};
|
|
|
|
export type Cancel = {
|
2023-07-30 06:39:53 +00:00
|
|
|
type: "CancelPopOver";
|
2023-06-30 14:05:57 +00:00
|
|
|
};
|
|
|
|
|
2023-09-23 21:33:30 +00:00
|
|
|
export type SelectConversation = {
|
|
|
|
type: "SelectConversation";
|
2023-06-30 14:05:57 +00:00
|
|
|
pubkey: PublicKey;
|
2023-10-04 21:34:43 +00:00
|
|
|
isGroupChat: boolean;
|
2023-06-30 14:05:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export type SearchModel = {
|
|
|
|
isSearching: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const SearchInitModel = (): SearchModel => {
|
|
|
|
return {
|
|
|
|
isSearching: false,
|
|
|
|
};
|
|
|
|
};
|