ssb: Split recent votes into their own sidebar item as an experiment. #122
This commit is contained in:
@ -128,7 +128,7 @@ class TfElement extends LitElement {
|
||||
}
|
||||
|
||||
next_channel(delta) {
|
||||
let channel_names = ['', '@', '🔐', ...this.channels.map((x) => '#' + x)];
|
||||
let channel_names = ['', '@', '🔐', '👍', ...this.channels.map((x) => '#' + x)];
|
||||
let index = channel_names.indexOf(this.hash.substring(1));
|
||||
index = index != -1 ? index + delta : 0;
|
||||
tfrpc.rpc.setHash(
|
||||
@ -383,6 +383,12 @@ class TfElement extends LitElement {
|
||||
JOIN messages ON messages.rowid = messages_fts.rowid
|
||||
JOIN json_each(?2) AS following ON messages.author = following.value
|
||||
WHERE messages.author != ?4
|
||||
UNION
|
||||
SELECT '👍' AS channel, MAX(messages.rowid) AS rowid FROM messages
|
||||
JOIN json_each(?2) AS following ON messages.author = following.value
|
||||
WHERE
|
||||
messages.content ->> 'type' = 'vote' AND
|
||||
messages.author != ?4
|
||||
`,
|
||||
[
|
||||
JSON.stringify(this.channels),
|
||||
|
Reference in New Issue
Block a user