Skip to content

Commit

Permalink
Merge origin/develop into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ShAlexHo08HPI committed Jun 21, 2024
2 parents 3771f0f + b950625 commit e2f8a4e
Show file tree
Hide file tree
Showing 15 changed files with 67 additions and 34 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
utility
imageFormFrom: aString

^ Form fromFileNamed: aString
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
utility
getFormFor: anImageId

| promise |
promise := self getFormPromiseFor: anImageId.
promise wait.
^ promise value
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
utility
getFormPromiseFor: anImageId

| promise |
promise := self at: anImageId ifAbsent: [
self at: anImageId put: Promise new.
self requestFileFor: anImageId with: (self at: anImageId).
self at: anImageId
].
^ promise >>= [:aPath | self class imageFormFrom: aPath]
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"class" : {
"extractPathFrom:" : "JK 6/12/2024 19:32",
"imageFormFrom:" : "JK 6/21/2024 13:53",
"newWith:" : "pk 6/19/2021 18:09" },
"instance" : {
"core" : "pk 6/19/2021 16:13",
"core:" : "pk 6/19/2021 16:13",
"getFormFor:" : "JK 6/21/2024 13:30",
"getFormPromiseFor:" : "JK 6/21/2024 13:47",
"requestFileFor:with:" : "JK 6/12/2024 19:23" } }
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"class" : {
"extractPathFrom:" : "pk 6/19/2021 16:23",
"imageFormFrom:" : "pk 8/5/2021 16:52",
"newWith:" : "6/14/2024 09:21:38" },
"extractPathFrom:" : "6/21/2024 14:11:19",
"imageFormFrom:" : "6/21/2024 14:11:19",
"newWith:" : "6/21/2024 14:11:19" },
"instance" : {
"core" : "6/14/2024 09:21:38",
"core:" : "6/14/2024 09:21:38",
"getFormFor:" : "JK 5/16/2024 22:13",
"getFormPromiseFor:" : "rgw 6/6/2022 18:43",
"requestImageFor:with:" : "JK 6/12/2024 19:46" } }
"core" : "6/21/2024 14:11:19",
"core:" : "6/21/2024 14:11:19",
"getFormFor:" : "6/21/2024 14:11:19",
"getFormPromiseFor:" : "6/21/2024 14:11:19",
"requestImageFor:with:" : "6/21/2024 14:11:19" } }
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"newSendMessage:to:" : "6/7/2024 09:02:10",
"newSendMessage:to:asReplyTo:" : "JS 5/20/2022 10:02",
"newSendPhoneNumber:" : "RS 6/23/2021 16:34",
"newSendStickerMessage:to:" : "JK 5/28/2024 10:52",
"newSendStickerMessage:to:" : "JK 6/21/2024 14:08",
"newSetPollAnswer:message:options:" : "TU 6/6/2024 01:15",
"newUser:" : "JB 8/1/2021 11:55",
"newWithType:from:" : "rs 6/6/2020 16:21" },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
utility
imageFormFrom: aString

| file byteArray |
file := FileStream fileNamed: aString.
file binary.
byteArray := file next: file size.
file close.
^ (TCCLibWebP decode: byteArray).
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"class" : {
"extractPathFrom:" : "pk 6/19/2021 16:23",
"extractPathFrom:" : "6/21/2024 14:11:19",
"imageFormFrom:" : "JK 6/21/2024 13:46",
"newWith:" : "JK 6/20/2024 22:18",
"stickerFormFrom:" : "JK 6/5/2024 11:15" },
"stickerFormFrom:" : "6/21/2024 14:11:19" },
"instance" : {
"core" : "pk 6/19/2021 16:13",
"core:" : "pk 6/19/2021 16:13",
"core" : "6/21/2024 14:11:19",
"core:" : "6/21/2024 14:11:19",
"downloadStickerSet:" : "JK 6/19/2024 11:33",
"getFormFor:" : "JK 6/5/2024 11:12",
"getFormPromiseFor:" : "JK 5/16/2024 21:21",
"getFormFor:" : "6/21/2024 14:11:19",
"getFormPromiseFor:" : "6/21/2024 14:11:19",
"getInstalledStickers" : "JK 6/5/2024 11:37",
"loadStickerIds" : "JK 6/20/2024 23:39",
"requestStickerFor:with:" : "JK 5/16/2024 21:40",
"stickerIds" : "6/21/2024 00:59:09",
"stickerIds:" : "6/21/2024 00:59:09",
"stickerIds" : "JK 6/21/2024 14:11",
"stickerIds:" : "JK 6/21/2024 14:11",
"stickerSets" : "JK 6/19/2024 11:30",
"stickerSets:" : "JK 6/19/2024 11:30",
"storeStickerSet:" : "JK 6/19/2024 11:44" } }
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
],
"commentStamp" : "<historical>",
"instvars" : [
"core",
"stickerSets" ],
"name" : "TCCStickerStore",
"pools" : [
],
"super" : "Dictionary",
"super" : "TCCFileStore",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"class" : {
"extractPathFrom:" : "pk 6/19/2021 16:23",
"imageFormFrom:" : "pk 8/5/2021 16:52" },
"extractPathFrom:" : "6/21/2024 14:11:19",
"imageFormFrom:" : "6/21/2024 14:11:19" },
"instance" : {
"getFormFor:" : "JK 6/12/2024 19:28",
"getFormPromiseFor:" : "JK 6/12/2024 19:30",
"getFormFor:" : "6/21/2024 14:11:19",
"getFormPromiseFor:" : "6/21/2024 14:11:19",
"getVideoFor:" : "JK 6/12/2024 19:48",
"getVideoPromiseFor:" : "JK 6/12/2024 19:56" } }
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"new:" : "6/14/2024 00:26:16",
"new:with:" : "F.M. 6/5/2024 14:49" },
"instance" : {
"initializeWith:" : " 6/21/2024 13:51:11",
"initializeWith:" : "AH 6/21/2024 14:33",
"initializeWith:and:" : "TU 6/20/2024 21:56",
"mouseDown:" : "TU 6/6/2024 01:46",
"selected" : " 6/21/2024 13:51:11",
"selected:" : " 6/21/2024 13:51:11",
"selected" : "AH 6/21/2024 14:33",
"selected:" : "AH 6/21/2024 14:33",
"updateSelection" : "TU 6/14/2024 00:29",
"updateText:" : " 6/21/2024 13:51:11" } }
"updateText:" : "AH 6/21/2024 14:33" } }
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
event handling
mouseDown: anEvent

self selectedChat sendStickerMessage: path.
"Transcript show: self asString."
self selectedChat sendStickerMessage: self path.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"instance" : {
"id" : "JK 6/5/2024 11:46",
"id:" : "JK 6/5/2024 11:46",
"mouseDown:" : "JK 5/28/2024 11:57",
"mouseDown:" : "JK 6/21/2024 14:00",
"path" : "JK 5/28/2024 09:45",
"path:" : "JK 5/28/2024 09:45",
"selectedChat" : "JK 5/28/2024 10:20",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ buildStickerListItemsFor: anArray
item := (TCUStickerListItem new
image: ((self core stickerStore getFormFor: stickerId) scaledToWidth: 100);
id: stickerId;
selectedChat: self selectedChat).
selectedChat: self selectedChat;
path: ((self core stickerStore at: stickerId) value)).
item on: #mouseDown send: #sendStickerMessage:event:from: to: self selectedChat withValue: stickerId.
stickers add: item].
self items: stickers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"addNextButton" : "JK 6/19/2024 12:03",
"addPreviousButton" : "JK 6/19/2024 12:04",
"buildStickerListItems" : "JK 6/19/2024 11:27",
"buildStickerListItemsFor:" : "JK 6/20/2024 12:40",
"buildStickerListItemsFor:" : "JK 6/21/2024 14:07",
"close" : "JK 5/29/2024 20:09",
"collectInstalledStickers" : "6/20/2024 11:30:00",
"convertWebp:" : "6/21/2024 00:13:58",
"collectInstalledStickers" : "6/21/2024 14:11:19",
"convertWebp:" : "6/21/2024 14:11:19",
"core" : "JK 5/31/2024 14:29",
"core:" : "JK 5/31/2024 14:29",
"downloadStickerSetFrom:" : "6/20/2024 11:30:00",
Expand Down

0 comments on commit e2f8a4e

Please sign in to comment.