-
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.
Beim Klick auf "Reply" scrollen (#504)
* Adds scroll reply message by click loading messages if necessary Co-authored-by: antonykamp <[email protected]> * Add Tests Co-authored-by: antonykamp <[email protected]> * Fix lint Co-authored-by: lucasderreisende <[email protected]> * Revert UI tests deletion Co-authored-by: lucasderreisende <[email protected]> * Fix lint (again) * adapt to new tdlib version Co-authored-by: lucasderreisende <[email protected]> Co-authored-by: antonykamp <[email protected]> Co-authored-by: Antony Kmap <[email protected]> Co-authored-by: Richard Wohlbold <[email protected]>
- Loading branch information
1 parent
9b71702
commit a8588ff
Showing
73 changed files
with
420 additions
and
95 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
9 changes: 9 additions & 0 deletions
9
packages/TelegramClient-Core.package/TCCChat.class/instance/fulfillMessageRequest..st
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,9 @@ | ||
loading | ||
fulfillMessageRequest: aMessageId | ||
|
||
| fulfilledMessageRequests | | ||
|
||
fulfilledMessageRequests := self requestedMessages select: [:req | req messageId = aMessageId]. | ||
fulfilledMessageRequests do: [:messageRequest | messageRequest completeRequest.]. | ||
|
||
self requestedMessages removeAll: fulfilledMessageRequests. |
8 changes: 8 additions & 0 deletions
8
packages/TelegramClient-Core.package/TCCChat.class/instance/handleMessageRequest..st
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,8 @@ | ||
controlling | ||
handleMessageRequest: aMessageRequest | ||
|
||
((self messageIds occurrencesOf: (aMessageRequest messageId)) ~= 0) ifTrue: | ||
[aMessageRequest completeRequest.] | ||
ifFalse: | ||
[self requestedMessages add: aMessageRequest. | ||
self loadChatHistory.] |
4 changes: 4 additions & 0 deletions
4
...s/TelegramClient-Core.package/TCCChat.class/instance/increaseNumberOfRequestedMessages.st
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,4 @@ | ||
loading | ||
increaseNumberOfRequestedMessages | ||
|
||
self numberOfRequestedMessages: self numberOfRequestedMessages + self class defaultMessageLimit. |
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
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/requestedMessages..st
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,4 @@ | ||
accessing | ||
requestedMessages: aList | ||
|
||
requestedMessages := aList |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCChat.class/instance/requestedMessages.st
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,4 @@ | ||
accessing | ||
requestedMessages | ||
|
||
^ requestedMessages |
2 changes: 1 addition & 1 deletion
2
packages/TelegramClient-Core.package/TCCChat.class/instance/stillRequestedMessages.st
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,4 +1,4 @@ | ||
accessing | ||
stillRequestedMessages | ||
|
||
^ self numberOfRequestedMessages - self numberOfMessages |
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
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
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
packages/TelegramClient-Core.package/TCCMessageRequest.class/README.md
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 @@ | ||
Class with the id of a requested message. If request is completed, execute the completionMessage on the completionReceiver. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCMessageRequest.class/instance/completeRequest.st
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,4 @@ | ||
accessing | ||
completeRequest | ||
|
||
self completionReceiver perform: (self completionMessage) with: (self messageId) |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCMessageRequest.class/instance/completionMessage..st
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,4 @@ | ||
accessing | ||
completionMessage: aMessage | ||
|
||
completionMessage := aMessage |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCMessageRequest.class/instance/completionMessage.st
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,4 @@ | ||
accessing | ||
completionMessage | ||
|
||
^ completionMessage |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCMessageRequest.class/instance/completionReceiver..st
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,4 @@ | ||
accessing | ||
completionReceiver: aReceiver | ||
|
||
completionReceiver := aReceiver |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCMessageRequest.class/instance/completionReceiver.st
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,4 @@ | ||
accessing | ||
completionReceiver | ||
|
||
^ completionReceiver |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCMessageRequest.class/instance/messageId..st
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,4 @@ | ||
accessing | ||
messageId: aNumber | ||
|
||
messageId := aNumber |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-Core.package/TCCMessageRequest.class/instance/messageId.st
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,4 @@ | ||
accessing | ||
messageId | ||
|
||
^ messageId |
11 changes: 11 additions & 0 deletions
11
packages/TelegramClient-Core.package/TCCMessageRequest.class/methodProperties.json
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,11 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"completeRequest" : "LR 6/5/2022 13:05", | ||
"completionMessage" : "aka 6/15/2022 11:45", | ||
"completionMessage:" : "aka 6/15/2022 11:45", | ||
"completionReceiver" : "aka 6/15/2022 11:46", | ||
"completionReceiver:" : "aka 6/15/2022 11:46", | ||
"messageId" : "aka 6/15/2022 11:47", | ||
"messageId:" : "aka 6/15/2022 11:47" } } |
16 changes: 16 additions & 0 deletions
16
packages/TelegramClient-Core.package/TCCMessageRequest.class/properties.json
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,16 @@ | ||
{ | ||
"category" : "TelegramClient-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "aka 6/15/2022 12:07", | ||
"instvars" : [ | ||
"messageId", | ||
"completionReceiver", | ||
"completionMessage" ], | ||
"name" : "TCCMessageRequest", | ||
"pools" : [ | ||
], | ||
"super" : "Object", | ||
"type" : "normal" } |
2 changes: 1 addition & 1 deletion
2
packages/TelegramClient-Core.package/TCCWindowsClient.class/methodProperties.json
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
8 changes: 5 additions & 3 deletions
8
packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/addAtBottom..st
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
6 changes: 4 additions & 2 deletions
6
packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/addAtTop..st
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
9 changes: 9 additions & 0 deletions
9
...es/TelegramClient-UI.package/TCUChatMessageList.class/instance/requestScrollToMessage..st
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,9 @@ | ||
messages | ||
requestScrollToMessage: aMessageId | ||
|
||
| messageRequest | | ||
messageRequest := TCCMessageRequest new messageId: aMessageId; | ||
completionReceiver: self; | ||
completionMessage: #scrollToMessage:; | ||
yourself. | ||
self chat handleMessageRequest: messageRequest |
7 changes: 7 additions & 0 deletions
7
packages/TelegramClient-UI.package/TCUChatMessageList.class/instance/scrollToMessage..st
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,7 @@ | ||
drawing | ||
scrollToMessage: aMessageId | ||
|
||
| messageItem messageIndex | | ||
messageIndex := self chat messageIds reversed indexOf: aMessageId. | ||
messageItem := self items at: messageIndex. | ||
self scrollToShow: messageItem |
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
11 changes: 6 additions & 5 deletions
11
packages/TelegramClient-UI.package/TCUMessage.class/instance/addReplySnippet.st
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
2 changes: 1 addition & 1 deletion
2
packages/TelegramClient-UI.package/TCUMessage.class/instance/mouseDown..st
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,4 +1,4 @@ | ||
accessing | ||
initialization | ||
mouseDown: anEvent | ||
|
||
^ self messageModel chat selectedReplyToMessageId: self messageModel id |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUMessage.class/instance/triggerRequestScroll.st
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,4 @@ | ||
constructing | ||
triggerRequestScroll | ||
|
||
self triggerEvent: #requestScroll |
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
packages/TelegramClient-UI.package/TCUReplySnippet.class/README.md
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 @@ | ||
Show the reply snippet on top of a referencing message. |
Oops, something went wrong.