-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lib): add channel suggestion box (#125)
* feat(lib): add channel suggestion box * feat(lib): fix switching channels and channel id for direct conversations * feat(lib): rm a comment
- Loading branch information
1 parent
a3d3952
commit 681c1f7
Showing
15 changed files
with
159 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export const cyrb53a = function (str: string, seed = 0) { | ||
let h1 = 0xdeadbeef ^ seed, | ||
h2 = 0x41c6ce57 ^ seed | ||
for (let i = 0, ch; i < str.length; i++) { | ||
ch = str.charCodeAt(i) | ||
h1 = Math.imul(h1 ^ ch, 0x85ebca77) | ||
h2 = Math.imul(h2 ^ ch, 0xc2b2ae3d) | ||
} | ||
h1 ^= Math.imul(h1 ^ (h2 >>> 15), 0x735a2d97) | ||
h2 ^= Math.imul(h2 ^ (h1 >>> 15), 0xcaf649a9) | ||
h1 ^= h2 >>> 16 | ||
h2 ^= h1 >>> 16 | ||
|
||
return 2097152 * (h2 >>> 0) + (h1 >>> 11) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 11 additions & 7 deletions
18
...user-suggestion-box/UserSuggestionBox.tsx → ...data-suggestion-box/DataSuggestionBox.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
samples/react-native-group-chat/components/data-suggestion-box/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./DataSuggestionBox" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export * from "./actions-menu" | ||
export * from "./list-item" | ||
export * from "./user-suggestion-box" | ||
export * from "./data-suggestion-box" | ||
export * from "./quote" | ||
export * from "./avatar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
samples/react-native-group-chat/components/user-suggestion-box/index.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.