merge next into next-reply

This commit is contained in:
or-else
2021-08-29 11:10:13 -07:00
17 changed files with 993 additions and 615 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ export function bytesToHumanSize(bytes) {
// Get 32 bit integer hash value for a string. Ideally it should produce the same value
// as Java's String#hash().
function stringToColorHash(value) {
export function stringToColorHash(value) {
let hash = 0;
value = '' + value;
for (let i = 0; i < value.length; i++) {
+2 -2
View File
@@ -2,11 +2,11 @@
import Tinode from 'tinode-sdk';
import { stringHash } from './strformat.js';
import { stringToColorHash } from './strformat.js';
// User avatar letter color id.
export function letterTileColor(userId) {
return Math.abs(stringHash(userId)) % 16;
return Math.abs(stringToColorHash(userId)) % 16;
}
// Make shortcut icon appear with a green dot + show unread count in title.