-
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
32 changed files
with
156 additions
and
21 deletions.
There are no files selected for viewing
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
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
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' -> false. | ||
'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
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 |
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 | ||
|
||
^ allInputFields |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/anonymousChoice..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 | ||
anonymousChoice: aChoice | ||
|
||
anonymousChoice := aChoice |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/anonymousChoice.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 | ||
anonymousChoice | ||
|
||
^ anonymousChoice |
4 changes: 3 additions & 1 deletion
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/confirmPressed.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,5 +1,7 @@ | ||
event handling | ||
confirmPressed | ||
|
||
self chat sendPollMessage: 'babbing'. | ||
self question: (self allInputFields at: 1) contents asString withBlanksTrimmed squeakToUtf8. | ||
self getOptions. | ||
(self question) ifNotEmpty: [self chat sendPollMessage: (self pollType) asking: (self question) with: (self options) isAnonymous: (self isAnonymous)]. | ||
self abandon. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/createAnonymousChoice.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 | ||
createAnonymousChoice | ||
|
||
self anonymousChoice: (TCUChoice newFor: 'Anonymous Poll?'). |
7 changes: 7 additions & 0 deletions
7
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/getOptions.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 | ||
getOptions | ||
|
||
self options: (OrderedCollection new). | ||
self options add: (self allInputFields at: 2) contents asString withBlanksTrimmed squeakToUtf8. | ||
self options add: (self allInputFields at: 3) contents asString withBlanksTrimmed squeakToUtf8. | ||
self options add: (self allInputFields at: 4) contents asString withBlanksTrimmed squeakToUtf8. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/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,4 @@ | ||
as yet unclassified | ||
isAnonymous: aBoolean | ||
|
||
isAnonymous := aBoolean |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/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,4 @@ | ||
as yet unclassified | ||
isAnonymous | ||
|
||
^ isAnonymous |
2 changes: 2 additions & 0 deletions
2
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/nextPressed.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,5 +1,7 @@ | ||
event handling | ||
nextPressed | ||
|
||
self isAnonymous: self anonymousChoice isSelected. | ||
self pollType: (self currentSelection) name. | ||
self typeOption abandon. | ||
self createNameSetter. |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/options..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 | ||
options: anOrderedCollection | ||
|
||
options := anOrderedCollection |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/options.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 | ||
options | ||
|
||
^ options |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/pollType..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 | ||
pollType: aString | ||
|
||
pollType := aString |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/pollType.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 | ||
pollType | ||
|
||
^ pollType |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/question..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 | ||
question: aString | ||
|
||
question := aString |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChatPollEditor.class/instance/question.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 | ||
question | ||
|
||
^ question |
24 changes: 19 additions & 5 deletions
24
packages/TelegramClient-UI.package/TCUChatPollEditor.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 |
---|---|---|
@@ -1,25 +1,39 @@ | ||
{ | ||
"class" : { | ||
"newFor:withBounds:" : "jkon 6/17/2024 11:14" }, | ||
"newFor:withBounds:" : "jkon 6/27/2024 20:14" }, | ||
"instance" : { | ||
"addChoices" : "6/24/2024 10:41:19", | ||
"addChoices:" : "jkon 6/19/2024 21:34", | ||
"addChoices:" : "jkon 6/27/2024 19:24", | ||
"addConfirmButton:" : "jkon 6/18/2024 10:05", | ||
"addInputFieldFor:" : "jkon 6/19/2024 21:44", | ||
"addInputFieldFor:" : "jkon 6/27/2024 20:15", | ||
"addNextButton:" : "jkon 6/19/2024 18:50", | ||
"addTextFieldFor:with:" : "jkon 6/18/2024 13:31", | ||
"addTextInputFor:" : "jkon 6/19/2024 21:41", | ||
"addTypeOption" : "jkon 6/19/2024 21:29", | ||
"allInputFields" : "jkon 6/27/2024 20:13", | ||
"allInputFields:" : "jkon 6/27/2024 20:14", | ||
"anonymousChoice" : "jkon 6/27/2024 19:03", | ||
"anonymousChoice:" : "jkon 6/27/2024 19:03", | ||
"chat" : "jkon 6/17/2024 10:29", | ||
"chat:" : "jkon 6/17/2024 10:29", | ||
"clear" : "jkon 6/18/2024 13:40", | ||
"confirmPressed" : "jkon 6/26/2024 10:54", | ||
"confirmPressed" : "jkon 6/27/2024 20:32", | ||
"createAnonymousChoice" : "jkon 6/27/2024 19:02", | ||
"createNameSetter" : "jkon 6/19/2024 21:33", | ||
"createTypeOption" : "jkon 6/19/2024 21:48", | ||
"currentSelection" : "jkon 6/19/2024 18:39", | ||
"currentSelection:" : "jkon 6/19/2024 18:40", | ||
"getOptions" : "jkon 6/27/2024 20:32", | ||
"initialize" : "jkon 6/18/2024 13:39", | ||
"isAnonymous" : "jkon 6/27/2024 19:14", | ||
"isAnonymous:" : "jkon 6/27/2024 19:13", | ||
"newSelection:" : "jkon 6/19/2024 18:39", | ||
"nextPressed" : "jkon 6/19/2024 18:51", | ||
"nextPressed" : "jkon 6/27/2024 19:27", | ||
"options" : "jkon 6/27/2024 14:47", | ||
"options:" : "jkon 6/27/2024 14:47", | ||
"pollType" : "jkon 6/27/2024 14:46", | ||
"pollType:" : "jkon 6/27/2024 14:46", | ||
"question" : "jkon 6/27/2024 14:46", | ||
"question:" : "jkon 6/27/2024 14:47", | ||
"typeOption" : "jkon 6/17/2024 11:03", | ||
"typeOption:" : "jkon 6/17/2024 11:03" } } |
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
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChoice.class/instance/name..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 | ||
name: aString | ||
|
||
name := aString |
4 changes: 4 additions & 0 deletions
4
packages/TelegramClient-UI.package/TCUChoice.class/instance/name.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 | ||
name | ||
|
||
^ name |
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