Skip to content

Commit

Permalink
Merge develop into develop2
Browse files Browse the repository at this point in the history
  • Loading branch information
gitjannes committed Jul 5, 2024
2 parents 009cab7 + e454f3d commit b4e94fa
Show file tree
Hide file tree
Showing 74 changed files with 442 additions and 53 deletions.
14 changes: 7 additions & 7 deletions .squot-materialize
Original file line number Diff line number Diff line change
Expand Up @@ -182,19 +182,19 @@
],
#encoding : Class [ #JPEGReadWriter2 ]
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'play_circle_outline_icon.png'
],
#encoding : @6
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
'workflows',
'ci-linter.yml'
],
#encoding : 'TXT'
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'play_circle_outline_icon.png'
],
#encoding : @6
}
]
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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
"sendDocumentMessage:" : "ED 6/19/2024 13:53",
"sendMessage:" : "JK 5/28/2024 09:53",
"sendPhotoMessage:" : "ED 6/19/2024 12:11",
"sendPollMessage:" : " 7/5/2024 09:48:19",
"sendPollMessage:asking:with:isAnonymous:" : "jkon 6/27/2024 20:35",
"sendStickerMessage:" : "JK 5/28/2024 10:26",
"sendVideoMessage:" : "ED 6/19/2024 12:23",
"stillRequestedMessages" : "ek 8/4/2022 11:38",
Expand Down
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'
})
})
}
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).
}).
})
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. })]
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@
"newSendMessage:to:" : "6/7/2024 09:02:10",
"newSendMessage:to:asReplyTo:" : "JS 5/20/2022 10:02",
"newSendPhoneNumber:" : "RS 6/23/2021 16:34",
"newSendPhotoMessage:to:" : "ED 6/19/2024 12:10",
"newSendPhotoMessage:to:" : "jkon 6/27/2024 09:20",
"newSendPollMessage:to:" : " 7/5/2024 09:48:19",
"newSendPollMessage:to:asking:with:isAnonymous:" : "jkon 6/28/2024 09:16",
"newSendStickerMessage:to:" : "JK 6/21/2024 14:08",
"newSendVideoMessage:to:" : "ED 6/19/2024 12:22",
"newSetPollAnswer:message:options:" : "TU 6/6/2024 01:15",
"newUser:" : "JB 8/1/2021 11:55",
"newWithType:from:" : "rs 6/6/2020 16:21" },
"newWithType:from:" : "rs 6/6/2020 16:21",
"selectJsonFor:" : "jkon 6/27/2024 14:35" },
"instance" : {
"asString" : "js 8/1/2020 12:16" } }
Empty file.
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
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
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.
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.
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.
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
buttonMenu: aRectangle

buttonMenu := aRectangle
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
buttonMenu

^ buttonMenu
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
chat: anObject

chat := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
chat

^ chat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
chatWindow: aChatWindow

chatWindow := aChatWindow
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
chatWindow

^ chatWindow
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
clear

self abandon.
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).
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
fileButton: anObject

fileButton := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
fileButton

^ fileButton
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
pollButton: anObject

pollButton := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
pollButton

^ pollButton
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
stickerButton: anObject

stickerButton := anObject.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
stickerButton

^ stickerButton
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" } }
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" }
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ newFor: aChat withBounds: aRectangle

^ (super newBounds: aRectangle)
chat: aChat;
allInputFields: (OrderedCollection new);
addTypeOption;
yourself
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).
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ addInputFieldFor: aRectangle
color: Color white;
contentsWrapped: '' asText;
extent: 200 @ 20;
"crAction: [self buttonSendPressed];
" yourself).
"crAction: [self buttonSendPressed];"
yourself).
self allInputFields add: inputField.
aRectangle addMorph: inputField.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
allInputFields: anOrderedCollection

allInputFields:= anOrderedCollection
Loading

0 comments on commit b4e94fa

Please sign in to comment.