From f645952d0a12e715406e430e65358be202e57d6d Mon Sep 17 00:00:00 2001 From: mivinac <110471032+mivinac@users.noreply.github.com> Date: Thu, 16 Feb 2023 04:15:13 +0300 Subject: [PATCH 1/5] Created app.xml for messenger --- tpl/Messenger/App.xml | 571 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 571 insertions(+) create mode 100644 tpl/Messenger/App.xml diff --git a/tpl/Messenger/App.xml b/tpl/Messenger/App.xml new file mode 100644 index 0000000..c9813c7 --- /dev/null +++ b/tpl/Messenger/App.xml @@ -0,0 +1,571 @@ + {extends "../@layout.xml"} + +{block title}{$correspondent->getCanonicalName()}{/block} + + + +{block header} + + {_my_messages} » + + {$correspondent->getCanonicalName()} + + + +
+ + {var diff = date_diff(date_create(), date_create('@' . $online))} + + {if 5 >= $diff->i} + + {_online} + + {else} + + {$correspondent->getOnline()} + + {/if} + +
+ +{/block} + + + +{block titleHeader} + + {$correspondent->getCanonicalName()} + +
+ + {var diff = date_diff(date_create(), date_create('@' . $online))} + + {if 5 >= $diff->i} + + {_online} + + {else} + + {$correspondent->isFemale() ? "заходила" : "заходил"} {$correspondent->getOnline()} + + {/if} + +
+ +{/block} + + + +{block body} + +
+ +
+ +
+ +
+ + + +
+ + + + + + + +
+ +
+ +
+ +
+ +
+ + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + {if $correspondent->getId() === $thisUser->getId() || $correspondent->getPrivacyPermission('messages.write', $thisUser)} + +
+ + + + + +
+ + {else} + +
+ + {/if} + +
+ +
+ +
+ + + + + + + +{/block} From 94fa4135ffb450a8f6c4c69b338267a8fade4946 Mon Sep 17 00:00:00 2001 From: mivinac <110471032+mivinac@users.noreply.github.com> Date: Thu, 16 Feb 2023 04:16:46 +0300 Subject: [PATCH 2/5] Created index.xml for Messenger --- tpl/Messenger/Index.xml | 101 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 tpl/Messenger/Index.xml diff --git a/tpl/Messenger/Index.xml b/tpl/Messenger/Index.xml new file mode 100644 index 0000000..f904764 --- /dev/null +++ b/tpl/Messenger/Index.xml @@ -0,0 +1,101 @@ +{extends "../@layout.xml"} + +{block title}{_my_messages}{/block} + + + +{block header}{_my_messages}{/block} + + + +{block titleHeader} + + {_my_messages} + +{/block} + + + +{block body} + +
+ +
+ +
+ + + +
+ +
+ +
+ + + +
+ +
+ +
+ + + + {if sizeof($corresps) > 0} + +
+ +
+ + {var recipient = $coresp->getCorrespondents()[1]} + + {var lastMsg = $coresp->getPreviewMessage()} + + + +
+ + Фотография пользователя + +
+ + + +
+ +
+ + {else} + +
+ +
+ +
Вам никто не писал. Пока что.
+ + {/if} + +
+ +{/block} From df9e7cdcae5226c16951d18b62373a9dfc0506c4 Mon Sep 17 00:00:00 2001 From: mivinac <110471032+mivinac@users.noreply.github.com> Date: Thu, 16 Feb 2023 04:17:40 +0300 Subject: [PATCH 3/5] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8b63704..356b5a7 100755 --- a/README.md +++ b/README.md @@ -13,5 +13,5 @@ Mobile theme for OpenVK for dumbphones, PDAs and old devices at all. Uses old pd - [ ] Settings - [ ] Notifications - [ ] News -- [ ] Messages -- [ ] Photo albums \ No newline at end of file +- [x] Messages (not same as PDA) +- [ ] Photo albums From ea66b4d3788de8c01d78e28adad15b48c452cdc9 Mon Sep 17 00:00:00 2001 From: mivinac <110471032+mivinac@users.noreply.github.com> Date: Sun, 28 May 2023 21:31:35 +0300 Subject: [PATCH 4/5] Try to fix --- tpl/Messenger/App.xml | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/tpl/Messenger/App.xml b/tpl/Messenger/App.xml index c9813c7..b52a564 100644 --- a/tpl/Messenger/App.xml +++ b/tpl/Messenger/App.xml @@ -204,8 +204,6 @@ } - - return true; }; @@ -258,8 +256,6 @@ } - - _setupListener() { let listenLongpool = () => { @@ -312,16 +308,12 @@ } - - appendMessages(messages) { messages.forEach(m => window.messages.push(m)); } - - prependMessages(messages) { messages.forEach(m => window.messages.unshift(m)); @@ -344,8 +336,6 @@ } - - _patchMessage(tempId, message) { for(let i = window.messages().length - 1; i > -1; i--) { @@ -360,8 +350,6 @@ return; - - window.messages.valueWillMutate(); window.messages()[i] = message; @@ -372,8 +360,6 @@ } - - _newSelfMessage(content = "...") { return { @@ -450,13 +436,10 @@ this.addMessage(msg); - - return msg._tuid; } - newReply(content) { @@ -464,38 +447,28 @@ this.addMessage(msg); - - return msg._tuid; } - - newReplies(replies) { replies.forEach(this.newReply); } - - sendMessage(content) { console.debug("New outcoming message. Pushing preview to local stack."); let tempId = this.newMessage(content); - - let msgData = new FormData(); msgData.set("content", content); msgData.set("hash", {$csrfToken}); - - let that = this; let xhr = new XMLHttpRequest(); From 649009301ea9c88dca14ae27690d1fea9f05a662 Mon Sep 17 00:00:00 2001 From: mivinac <110471032+mivinac@users.noreply.github.com> Date: Sun, 28 May 2023 21:32:05 +0300 Subject: [PATCH 5/5] Try to fix --- tpl/Messenger/Index.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/tpl/Messenger/Index.xml b/tpl/Messenger/Index.xml index f904764..2b85107 100644 --- a/tpl/Messenger/Index.xml +++ b/tpl/Messenger/Index.xml @@ -44,8 +44,6 @@ - - {if sizeof($corresps) > 0}
@@ -60,7 +58,6 @@ {var lastMsg = $coresp->getPreviewMessage()} -