-
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.
- Loading branch information
Showing
74 changed files
with
442 additions
and
53 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
5 changes: 5 additions & 0 deletions
5
packages/TelegramClient-Core.package/TCCChat.class/instance/sendPollMessage..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,5 @@ | ||
sending | ||
sendPollMessage: aPoll | ||
|
||
self core send: (TCCRequest newSendPollMessage: aPoll to: self id). | ||
self selectedReplyToMessageId: self class defaultSelectedReplyToMessageId. |
5 changes: 5 additions & 0 deletions
5
...ramClient-Core.package/TCCChat.class/instance/sendPollMessage.asking.with.isAnonymous..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,5 @@ | ||
sending | ||
sendPollMessage: aPollType asking: aString with: anOrderedCollection isAnonymous: aBoolean | ||
|
||
self core send: (TCCRequest newSendPollMessage: aPollType to: (self id) asking: aString with: anOrderedCollection isAnonymous: aBoolean). | ||
self selectedReplyToMessageId: self class defaultSelectedReplyToMessageId. |
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
32 changes: 32 additions & 0 deletions
32
packages/TelegramClient-Core.package/TCCRequest.class/class/newSendPollMessage.to..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,32 @@ | ||
instance creation | ||
newSendPollMessage: aPoll to: aChatId | ||
|
||
^ TCCRequest | ||
newWithType: 'sendMessage' | ||
from: { | ||
'chat_id' -> aChatId. | ||
'input_message_content' -> (Dictionary newFrom: { | ||
'@type' -> 'inputMessagePoll'. | ||
'question' -> (Dictionary newFrom: { | ||
'@type' -> 'formattedText'. | ||
'text' -> 'hallo' | ||
}). | ||
'options' -> (OrderedCollection newFrom: {(Dictionary newFrom: { | ||
'@type' -> 'formattedText'. | ||
'text' -> 'Option 1' | ||
}). | ||
(Dictionary newFrom: { | ||
'@type' -> 'formattedText'. | ||
'text' -> 'Option 2' | ||
}). | ||
(Dictionary newFrom: { | ||
'@type' -> 'formattedText'. | ||
'text' -> 'Option 3' | ||
})}). | ||
'is_anonymous' -> 'false'. | ||
'type' -> (Dictionary newFrom: { | ||
'@type' -> 'pollTypeRegular'. | ||
'allow_multiple_answers' -> 'false' | ||
}) | ||
}) | ||
} |
15 changes: 15 additions & 0 deletions
15
...ent-Core.package/TCCRequest.class/class/newSendPollMessage.to.asking.with.isAnonymous..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,15 @@ | ||
instance creation | ||
newSendPollMessage: aPollType to: aChatId asking: aString with: anOptionOrderedCollection isAnonymous: aBoolean | ||
|
||
^ (TCCRequest | ||
newWithType: 'sendMessage' | ||
from: { | ||
'chat_id' -> aChatId. | ||
'input_message_content' -> (Dictionary newFrom: { | ||
'@type' -> 'inputMessagePoll'. | ||
'question' -> aString. | ||
'options' -> anOptionOrderedCollection. | ||
'is_anonymous' -> aBoolean. | ||
'type' ->(self selectJsonFor: aPollType). | ||
}). | ||
}) |
10 changes: 10 additions & 0 deletions
10
packages/TelegramClient-Core.package/TCCRequest.class/class/selectJsonFor..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,10 @@ | ||
as yet unclassified | ||
selectJsonFor: aPollType | ||
|
||
^ aPollType caseOf: { | ||
['regular'] -> [(Dictionary newFrom: {'@type' -> 'pollTypeRegular'. | ||
'allow_multiple_answers' -> false. })]. | ||
['multiple'] -> [(Dictionary newFrom: {'@type' -> 'pollTypeRegular'. | ||
'allow_multiple_answers' -> true. })]. | ||
['quiz'] -> [(Dictionary newFrom: {'@type' -> 'pollTypeQuiz'. 'correct_option_id' -> 0. })] | ||
} |
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
Empty file.
7 changes: 7 additions & 0 deletions
7
packages/TelegramClient-UI.package/TCUChatButtonPage.class/class/newFor.withBounds..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 @@ | ||
as yet unclassified | ||
newFor: aChatWindow withBounds: aRectangle | ||
|
||
^ (super newBounds: aRectangle) | ||
chatWindow: aChatWindow; | ||
addButtonMenu; | ||
yourself |
8 changes: 8 additions & 0 deletions
8
packages/TelegramClient-UI.package/TCUChatButtonPage.class/class/newFor.withBounds.from..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 @@ | ||
as yet unclassified | ||
newFor: aChat withBounds: aRectangle from: aChatWindow | ||
|
||
^ (super newBounds: aRectangle) | ||
chat: aChat; | ||
chatWindow: aChatWindow; | ||
addButtonMenu; | ||
yourself |
9 changes: 9 additions & 0 deletions
9
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/addButtonMenu.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 @@ | ||
as yet unclassified | ||
addButtonMenu | ||
|
||
self createButtonMenu; | ||
addStickerButton; | ||
addFileButton. | ||
(self chat isGroup) ifTrue: [self addPollButton]. | ||
self addMorphFront: self buttonMenu. | ||
self buttonMenu center: self center. |
10 changes: 10 additions & 0 deletions
10
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/addFileButton.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,10 @@ | ||
as yet unclassified | ||
addFileButton | ||
|
||
self fileButton: (TCUButton new | ||
extent: 100 @ 30; | ||
text: 'Select File'; | ||
on: #mouseUp send: #buttonFileSelectPressed to: self chatWindow; | ||
name: 'selectFile'; | ||
yourself). | ||
self buttonMenu addMorph: self fileButton. |
10 changes: 10 additions & 0 deletions
10
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/addPollButton.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,10 @@ | ||
as yet unclassified | ||
addPollButton | ||
|
||
self pollButton: (TCUButton new | ||
extent: 100 @ 30; | ||
text: '|||'; | ||
on: #mouseUp send: #createPollEditor to: self chatWindow; | ||
name: 'openPollEditor'; | ||
yourself). | ||
self buttonMenu addMorph: self pollButton. |
10 changes: 10 additions & 0 deletions
10
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/addStickerButton.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,10 @@ | ||
as yet unclassified | ||
addStickerButton | ||
|
||
self stickerButton: (TCUButton new | ||
extent: 100 @ 30; | ||
text: 'Sticker'; | ||
on: #mouseUp send: #buttonStickerPressed to: self chatWindow; | ||
name: 'sendSticker'; | ||
yourself). | ||
self buttonMenu addMorph: self stickerButton. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/buttonMenu..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 @@ | ||
as yet unclassified | ||
buttonMenu: aRectangle | ||
|
||
buttonMenu := aRectangle |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/buttonMenu.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 @@ | ||
as yet unclassified | ||
buttonMenu | ||
|
||
^ buttonMenu |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/chat..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 | ||
chat: anObject | ||
|
||
chat := anObject. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/chat.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 | ||
chat | ||
|
||
^ chat |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/chatWindow..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 @@ | ||
as yet unclassified | ||
chatWindow: aChatWindow | ||
|
||
chatWindow := aChatWindow |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/chatWindow.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 @@ | ||
as yet unclassified | ||
chatWindow | ||
|
||
^ chatWindow |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/clear.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 @@ | ||
as yet unclassified | ||
clear | ||
|
||
self abandon. |
16 changes: 16 additions & 0 deletions
16
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/createButtonMenu.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,16 @@ | ||
as yet unclassified | ||
createButtonMenu | ||
|
||
self buttonMenu: (RectangleMorph new | ||
color: TCUDefaultValues colorNileBlue; | ||
extent: 200@200; | ||
useRoundedCorners; | ||
layoutPolicy: TableLayout new; | ||
listDirection: #leftToRight; | ||
wrapDirection: #bottomToTop; | ||
wrapCentering: #topLeft; | ||
layoutInset: 2; | ||
hResizing: #shrinkWrap; | ||
vResizing: #shrinkWrap; | ||
cellInset: 8; | ||
yourself). |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/fileButton..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 | ||
fileButton: anObject | ||
|
||
fileButton := anObject. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/fileButton.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 | ||
fileButton | ||
|
||
^ fileButton |
9 changes: 9 additions & 0 deletions
9
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/initialize.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 @@ | ||
as yet unclassified | ||
initialize | ||
|
||
super initialize. | ||
|
||
self | ||
color: (TCUDefaultValues colorLightGray alpha: 0.8); | ||
borderWidth: 0; | ||
on: #mouseUp send: #clear to: self. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/pollButton..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 | ||
pollButton: anObject | ||
|
||
pollButton := anObject. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/pollButton.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 | ||
pollButton | ||
|
||
^ pollButton |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/stickerButton..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 | ||
stickerButton: anObject | ||
|
||
stickerButton := anObject. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatButtonPage.class/instance/stickerButton.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 | ||
stickerButton | ||
|
||
^ stickerButton |
24 changes: 24 additions & 0 deletions
24
packages/TelegramClient-UI.package/TCUChatButtonPage.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,24 @@ | ||
{ | ||
"class" : { | ||
"newFor:withBounds:" : "jkon 7/4/2024 22:57", | ||
"newFor:withBounds:from:" : "jkon 7/5/2024 09:30" }, | ||
"instance" : { | ||
"addButtonMenu" : "jkon 7/5/2024 09:30", | ||
"addFileButton" : "jkon 7/4/2024 22:43", | ||
"addPollButton" : "jkon 7/4/2024 22:43", | ||
"addStickerButton" : "jkon 7/4/2024 22:43", | ||
"buttonMenu" : "jkon 7/4/2024 22:11", | ||
"buttonMenu:" : "jkon 7/4/2024 22:11", | ||
"chat" : "jkon 7/4/2024 22:06", | ||
"chat:" : "jkon 7/4/2024 22:06", | ||
"chatWindow" : "jkon 7/4/2024 22:42", | ||
"chatWindow:" : "jkon 7/4/2024 22:43", | ||
"clear" : "jkon 7/4/2024 22:09", | ||
"createButtonMenu" : "jkon 7/4/2024 22:13", | ||
"fileButton" : "jkon 7/4/2024 22:06", | ||
"fileButton:" : "jkon 7/4/2024 22:06", | ||
"initialize" : "jkon 7/4/2024 22:08", | ||
"pollButton" : "jkon 7/4/2024 22:06", | ||
"pollButton:" : "jkon 7/4/2024 22:06", | ||
"stickerButton" : "jkon 7/4/2024 22:06", | ||
"stickerButton:" : "jkon 7/4/2024 22:06" } } |
19 changes: 19 additions & 0 deletions
19
packages/TelegramClient-UI.package/TCUChatButtonPage.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,19 @@ | ||
{ | ||
"category" : "TelegramClient-UI", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"chat", | ||
"pollButton", | ||
"fileButton", | ||
"stickerButton", | ||
"buttonMenu", | ||
"chatWindow" ], | ||
"name" : "TCUChatButtonPage", | ||
"pools" : [ | ||
], | ||
"super" : "RectangleMorph", | ||
"type" : "normal" } |
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
16 changes: 12 additions & 4 deletions
16
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/addChoices..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,7 +1,15 @@ | ||
drawing | ||
addChoices: aRectangle | ||
|
||
aRectangle addMorph: (TCUChoice newFor: 'Anonymous Poll?'); | ||
addMorph: (TCUChoiceExclusive newFor: 'Standard Poll' inPoll: self); | ||
addMorph: (TCUChoiceExclusive newFor: 'Multiple Options' inPoll: self); | ||
addMorph: (TCUChoiceExclusive newFor: 'Quiz' inPoll: self). | ||
self createAnonymousChoice. | ||
|
||
aRectangle addMorph: self anonymousChoice; | ||
addMorph: ((TCUChoiceExclusive newFor: 'Standard Poll' inPoll: self) | ||
name: 'regular'; | ||
yourself); | ||
addMorph: ((TCUChoiceExclusive newFor: 'Multiple Options' inPoll: self) | ||
name: 'multiple'; | ||
yourself); | ||
addMorph: ((TCUChoiceExclusive newFor: 'Quiz' inPoll: self) | ||
name: 'quiz'; | ||
yourself). |
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-UI.package/TCUChatPollEditor.class/instance/allInputFields..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 @@ | ||
as yet unclassified | ||
allInputFields: anOrderedCollection | ||
|
||
allInputFields:= anOrderedCollection |
Oops, something went wrong.