mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-14 11:05:47 +05:00
read parent (Incomplete)
This commit is contained in:
parent
15f89f6a1c
commit
a42c67c4e1
@ -401,7 +401,7 @@ function displaycomment() {
|
||||
'td',
|
||||
m('i.fas.fa-angle-right', {
|
||||
class: 'fa-rotate-' + (commentStruct.showReplies ? '90' : '0'),
|
||||
style: 'margin-top:12px',
|
||||
style: 'cursor:pointer',
|
||||
onclick: () => {
|
||||
commentStruct.showReplies = !commentStruct.showReplies;
|
||||
},
|
||||
@ -525,7 +525,6 @@ const PostView = () => {
|
||||
ownId.splice(i, 1);
|
||||
}
|
||||
}
|
||||
console.log(ownId);
|
||||
});
|
||||
},
|
||||
view: (v) =>
|
||||
|
||||
@ -47,6 +47,19 @@ async function updatedisplayforums(keyid, details = {}) {
|
||||
|
||||
if (res3.body.retval) {
|
||||
Data.Threads[keyid][thread.mMsgId] = { thread: res3.body.msgs[0], showReplies: false };
|
||||
if (
|
||||
Data.Threads[keyid][thread.mMsgId] &&
|
||||
Data.Threads[keyid][thread.mMsgId].thread.mMeta.mMsgStatus === THREAD_UNREAD
|
||||
) {
|
||||
let parent = Data.Threads[keyid][thread.mMsgId].thread.mMeta.mParentId;
|
||||
console.log("orig: " + Data.Threads[keyid][thread.mMsgId].thread.mMeta.mMsgName);
|
||||
while(Data.Threads[keyid][parent])
|
||||
{
|
||||
console.log(Data.Threads[keyid][parent].thread.mMeta.mMsgName);
|
||||
Data.Threads[keyid][parent].thread.mMeta.mMsgStatus = THREAD_UNREAD;
|
||||
parent = Data.Threads[keyid][parent].thread.mMeta.mParentId;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Data.ParentThreads[keyid] === undefined) {
|
||||
Data.ParentThreads[keyid] = {};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user