From d28f69928ae82c0e85695809806cc7269a0c0ebc Mon Sep 17 00:00:00 2001 From: p-samuel <53358247+p-samuel@users.noreply.github.com> Date: Mon, 20 Mar 2023 22:53:59 -0300 Subject: [PATCH] :recycle: Small refactoring --- samples/android/publisher/src/View.Main.fmx | 166 ++++++++++---------- samples/android/publisher/src/View.Main.pas | 5 +- 2 files changed, 82 insertions(+), 89 deletions(-) diff --git a/samples/android/publisher/src/View.Main.fmx b/samples/android/publisher/src/View.Main.fmx index 0136f51..1a4020d 100644 --- a/samples/android/publisher/src/View.Main.fmx +++ b/samples/android/publisher/src/View.Main.fmx @@ -65,87 +65,87 @@ object ViewMain: TViewMain PNG = { 89504E470D0A1A0A0000000D49484452000000360000002E080600000063C0EA 2B000000017352474200AECE1CE90000000467414D410000B18F0BFC61050000 - 09FE494441546843ED595D6C54D7111EEFAE7F3076832140EC46C4098E6A20E5 - A71671DC26401542A3A84420153511955AF521B44F95D23EA0A42E455552B53C - 903E35AAAA4A3C14A9A49410456AE326981F6314630122FE09713098B5B1C15E - 6C637BD7FB7377FBCDCC39D777597B77A5B440A5CCEEECCC7C3367CECCBDE7DC - 7B7797BEA4FF332A30322B35373707AAABAB03C6A4C1C1C1BCC6FDB7291A8DA6 - 8E1F3F9ED8BB776F02A6AD2165641A652D706A6AAA2A10086C01D7C25C002E48 - 2693E2BB47E4808763B1D8858E8E8E93F5F5F5E3B0B9312E2AADC1591B4BA552 - 858944624B4141C1EBD06B0095830BC5796F898B8FA1A631C833232323BFDDB7 - 6F5FD7FEFDFBE3B0B9B9B98F3A06F9E3F1F88BE07E7012F67D49A82D8E837FBE - ABABEB89BABABA5294CE5B65EE151889441EC598CE3B9BC212BCF78C979750A3 - 130E87DF3B78F060154A2F01FBC1D25C468758BFBFC012FC0DF6150752027BEA - E6D82D1A0F4F12D24A8C0E3243E73C4670CCE52BB019B2E4102CDD11F0FB69E1 - FC325A54CA3B4309CD857A7B7BBF5F5B5BFB31CC2898F7613223A5E338CD383A - 1BD198F87A06FBE940EB31FAF8C600455349D48472D8235214B1451716446C17 - B3313ED5E5EDF10BEAB12D26529C3E91E581227AB6EA51DABEAA8E1E28E1D527 - 8D4D8742A15F575656BE0D931BE3FDE6F8D8E9259CE1F9B629A69EEBFDD4DC7F - 852663514A24E2C258DC2E271CD88EC7160C3A3866706F0CFB128EA3F1A24326 - 3DF196938861E65883DD8A45A86DB89F0626F8DAE192BFB8B8F87148EE85D91C - 8A4C729B92EB2892B3E6C3D1768F30D867A430BF44673752BAB8A872A66C2C83 - 8ADB187D71A0BC5C7C264EE7E2B35640096C87189AF512F06208DB94D06C8DA5 - 93CC69E2CD84E581422AC17A57580B114D9A9A8967A9BA91024B808B0BC6360B - 59AA0A698C3144611552D5D9C8460BE56ECCC69BC9033E1F6DFBDA6A7A69651D - 2D2F5B40857E1FA5D8CD45C99BA3389C0DCB0281B458DB240BC1F8D32C1E779C - 5AC66B71C5E6A03447D6C6DC48AB9849572CADA21F3EBD997EB6E1797AB9761D - 3D3CBF9CEF9A268643344EA4406C0B647C0633B83A8C34C47133790CC62FB6D5 - CC4A39CF98E69E9984995BE033B7F691E5F452FD467AF55BDFA1976B9EA08AA2 - 12E28738263BB98EE3B7196F3DC674732B24E0CC7C1AA38A0DF0C82C94E752C4 - A74C266A1A951597505D750DFDE0A96FD32F37BE409B2A976179E23E698B0341 - 535BA4E69264169320635B9F82AEF08EC987F268CC24554DCE56FFF8284D4C47 - F8D6A028FC15B871AE5DB69C7EBEE9BBD48833F8F5854BC80F5CF79E2D98DF1E - 5B064B027E0B8B2EB8622A0DCB5871F247569AAD31B359944C3A772276FEB5B3 - 9D7EF7E151EA18B84693D3D3EE13891FCB73011A6C58BE821A376FA357D63450 - 75E957A428265B98C96870D7624075132F3ED6ADCDAA46E4A4DC678CF3D80939 - 2DF429DC475AAE5FA5D73EFC07FDA9A5892E0D05692A3AED9E416E70112E28DB - D7D4D3F76AD7E23EC443A52A57BACD1ACC36A93E66A3F09C2650313672535E4B - D1CCA4498DCACA643C4EEF5EEDA6C68F8ED23BE75AA9F3FA358AE1C9C412DF58 - 4B70CFE382648C482E5412886E316F5E358C2DCC1F4A766C2ECA6F8F319B02A4 - 084EAF02FBC84743D86FA7FB7B2938169287E64C3263445A131F6E3EF5CAA70A - 83BB286C942A63D49F8B7236A6F935A14EE3C50A68311E467FB4F21BF41A2E1A - 1B1F5F45F30A8B24268D34D4483554306831818D4F14D7B63E8BE743799F314F - 76D943E58585F4E2632BE88DCDDB69E7FA0D54FDE0522A2D2A96C979A7F1990B - 8E8ED0D9A13EBD1A01771B115375C6750296994D892DAC211A9B9BF2684C13CB - 44621550C39287E9579BB6D24F9FDE42354B2AE52CD942F969FC066E07FFEE3E - 4F8DC78E52F3609F8CB7E4166AF32A2AB86B895B752637C6BC2C928D7237C613 - E84C22FCB8C43D5BB392EA1EA9A1124F437C8646266FD3A9CB5DF4E689F7E90F - 175A69301A966F7D520EE2F8DB5F04DFE9A60D47530E644ABEE7312B9E723119 - 6BE697692CE7411961F83ED5E6F7FBD71B93FE75A18D7E7FB6D95D4EFC28D5F8 - CD2DB4A176B5F8191F0B4F51C7F53E3A71E5129DBA11A424509F7CCDD0315C1C - DBB50B16D23395D59A8B4966D71224D696039144D0E5895B7432749D0A31A780 - 08AAC49EDEB5EA295ABDE4AB128A2F9AF1A9A9A9BF555454BC0A33029E063B26 - D30CCDD99829909F266C63B77135EC1CE8A3765C118FE1BE763B11D3A78D3B9A - 621900B66DF94AFA71DD33B8DF69EE6CC42BE04CF0737AE393D354E60F983C44 - 0F95CC4763F5B47A71F6C6F2588A5C9754A926F4703C4617D1D09F5B3FA23FB6 - 9FA477FB3EA349DCBFB4296609947826D1F0213EBCF8FE962F6B2A1E2C8A721E - 94D7C5C35B2CDFA5DEC185E1ADD6266A1AF85CF69134246E33B104AB6D31967C - A28471CAE6E4B4972727D7A1B318CE4E391B939C9C888B83C6935D8B4C50303C - 490E0CF5B3B4310A88AD8AC4F0B8512CDDABA337A9777498AEA4F188F218CB90 - E87DB8D9DFC03CFC00A06938BFA4CB8B32C2EEDC631F5C3C4BFBDA4F48615AA4 - B28C645D6663957114617409974D6F6CBC033E3F153326B6C965C65B5B4DF53B - 983501D67CEA5F8A3DF6CACAF5B4FA41FE29F18BEC313309B34ECCACB82DC08B - 0BC65EB6AD34B883A516493AC2D3468A2E977D8BF3255FEDF4A64480E510E7A4 - 3C1A33F9DC021511131F3AA1B6233E830B264E863CB691EE4B626674655C55F1 - 625C7C22746C11CE3AB39792C924FF9E98D671EEC66C52213B31438A59B7D8E2 - 33ECC12D33A83E28B8D1AB5F3156F0A9C40ADB822BC07A59A0889E5C5445CBCA - 2B18B494181F1FFF0C9223DDE6DC5C96EEDC634D9FB4D35BE75BE457D805C5C5 - 5455F6003DB9AC86D6542EC3A354BE7FC098693266B394CBAFC497FF227C0D9A - 07B6148BC586CF9D3BB7B3A1A1E13CCC3098CF5EFA578C1D3B76F871C96D07BB - D4DAD3997ABBE58354EBE54F5378A84D4DC7E3F207C1FD40682A313131F1F7DD - BB77F35F5D0BC1F68F89741A1A1A7A0C17996E334E28EE24EE9B46BC84A61C5C - 0D9B0F1C38D0505A5AFA10CAE77F2AF83B53E6F68A4422CF6140D08CBD2F291A - 8DA2C458EFD8D8D85F9A9A9A36AE5BB78EAFFBFC6FEB3CF0EC7F23617FEDC4D8 - FD814060B181D2087ECECDFF280E6009FCD3719C20E0FCAEBF5F9C641ED41041 - 53FD2D2D2D9FEEDAB5EB16A09887F58F06505A6338123FC1D5E74D3456C14D00 - E235C81B7110A7FD34FC974746462EDEBC7933D8D6D6367AE9D225DC769424C1 - FF9850576A74743475E6CC9904B60DFF36CBCC3FB2B0E41ADC3ADCC6F6ECD9E3 - 6B6C6C7C1D35EE8299C4D9180A87C31D3D3D3DEF7577775F1D1C1C0C8742A128 - 1A8A9D3A75CAFEE76B8F90E5BB45B6099E9F65460D6E63870E1DF26FDDBAF539 - 2CB100CE4AE8F0E1C343478E1C990E0683A9E1E1611ECC478513D964DEA698DC - A47789ECDCDE1A5CF22E45D699F926C16C2F9BB601EFD1B1922923E95DA659E7 - F736C6C43637E4BD64F240DB0CD3FDD250569AAD31AFB4649BFB92EE2D11FD07 - 652A159413C8BA5B0000000049454E44AE426082} + 09FD494441546843ED595D6C54D7111EEF8F6D8CDD600810BB117182A31A48F9 + A9451CB7095085D0AA2A1148454D44A5567D08ED53A5B40F28AD4B5195542D0F + A44F8DAAAA120F452A294D8822B57113CC8F318AB16A440C0E71C098B5B1C1FF + D8DEFFBBDB6F66CEB9BECBDABB2BA5052A65766767E69B397366EEB9E7DEBBBB + F439FD9F51919139A9A5A5255053531330260D0E0E1634EEBF4DB1582C7DE2C4 + 89E4FEFDFB93306D0D692333286781333333D58140601BB80EE62270512A9512 + DF3D22073C1C8FC7CF7775759D6A68689884CD8D7151190DCED9583A9D0E2693 + C96D4545453F4723B5802AC04171DE5BE2E2E3E009F0D9919191DF1C3870E0D2 + C1830713B0B9B9F98F3A9AF2271289E77154FAC129D8F725A1B6040E7EE7A54B + 979EA8AFAF2F43E9BC55E63F032391C8A368ECE29D4D61E5EE3DE3E525D4E884 + C3E1770E1F3E5C8DD24BC17EB03497D521827F06F1EB6030C88194C49EBA3531 + 4693E169425A86CC203374DE6304C77CBE229B21470EC1321D01BF9F162F2CA7 + 2565BC339450EF686F6FEF77EBEAEA3E841903F33E4C65A5741CA705BC198D89 + AF67B09F0EB51DA70F6F0E502C9D424D28873D2245115B746141C476311BE353 + 5DDE1EBFA01EDB6222C5E913591128A667AB1FA59D6BEAE981523EFBA4B1E8D8 + D8D8AFAAAAAADE80C98DF17E737CECF4125678A16D8AA9E7463FB5F4F7D2743C + 46C964421827B7CB4907B6E3B105830E8E1BDC1BC3BEA4E368BCE890294FBCE5 + 14629839D66063F108B50FF7D3C0145F3B5CF29794943C0EC9BD309B43914D6E + 53721D4572D67C38DAEE1106FB8C14E697E8EC464A17175556CAC632A8B88DD1 + 1707CACBC567E3742E5EB5224A623BC4D1AC97809740D8A684E66A2C93644E13 + 6F26AC0804A914E7BBC25A8868D2D46C3C4BD58D1458025C5C30B659C8A9AA90 + C61843145621559D8B6CB450FEC66CBC993CE0F3D18E2FADA51756D7D3CAF245 + 14F4FB28CD6E2E4ADE1CC5E16C581608A4C5DA265908C69FE6E471C7A965BC16 + 576C1ECA70E46CCC8DB48A9974D5F26AFAFED35BE9279BBE492FD66DA0871756 + 50DC5C3139D616275220B605323E83195C1D461AE2B8D93C06E317DB6AE6A4BC + 2BA6B9672761E61678E5D63FB2925E68D84C2F7FED1BF462ED1354595C4AFC10 + C76427D771FC36E3ADC7986E6E85049C9D4F6354B1011E99830A3C15F1299389 + 9A41E525A5545F534BDF7BEAEBF48BCDDFA22D552B707AE23E698B0341535BA4 + E69264169320635B9F82AEF08E29840A68CC24554D56AB7F729CA6A211BE3528 + 0A7F256E9CEB57ACA49F6EF936356105BFBC7819F981EBDEB305F3DB63CB6049 + C06F61D105574CA561192B4EFEC849733566368B9249E74EC4CEBF5CECA0DFBE + 7F8CBA06AED37434EA3E91F8717A2E42838D2B5751D3D61DF4D2BA46AA29FB82 + 14C5640B33190DEE5A0CA86EE2C5C7BAB559D588BC947FC5388F9D90D3429FC1 + 7DA4F5C6357AE5FDBFD31F5B9BE9F250886662517705B9C125B8A0EC5CD740DF + A95B8FFB100F95AA5CE9366B30DBA4FA988DC2739A40C5D8C84F059D8A66264D + 6A5456A613097AFB5A37357D708CDEFC771B5DBC719DE27832B1C437D652DCF3 + B8201923920B9504A25BCC9B570D630BF387921D9B8F0ADB63CCA6002982D3AB + C03EF2D110F6DB99FEAB149A189587E66C3263445A131F6E3EF5CAA70A83BB28 + 6C942A63D49F8FF236A6F935A14EE3C58A68291E467FB0FA2BF40A2E1A9B1F5F + 430B82C51293411A6AA41A2A18B498C0C6278A6B5B9FC50BA18257CC935DF650 + 453048CF3FB68A5EDDBA93766FDC44350F2EA7B2E212999C771AAF5C687C84CE + 0DF5E9D508B8DB8898AA33AE13B0CC6E4A6C610DD1D8FC5440639A582612AB88 + 1A973D4CBFDCB29D7EFCF436AA5D5625AB640BE5A7F19BB81DFCABBB939A8E1F + A396C13E196FC92DD4E6555470D712B7EA4C6E8C79592417E56F8C27D09944F8 + 71897BB67635D53F524BA59E86788546A66FD3E92B97E8B593EFD2EFCFB7D160 + 2C2CDFFAA41CC4F1B7BF08BED3450DC7D20E645ABEE7312B9E7631196BE69769 + 2C17405961F83ED5EEF7FB371A93FE79BE9D7E77AEC53D9DF851AAE9ABDB6853 + DD5AF1333E119EA1AE1B7D74B2F7329DBE19A214509F7CCDD0315C1CDB758B16 + D33355359A8B4966D71224D696039142D095A9313A357A83829853400455614F + EF59F314AD5DF64509C517CD44381CFE6B6565E5CB3023E028D831996669DEC6 + 4C81FC34611BBB8DABE1C5813EEAC015F138EE6BB793717DDAB8A3299601603B + 56AEA61FD63F83FB9DE6CE457C069C0D7D4AAF7E7486CAFD019387E8A1D28568 + AC81D62ECDDD5801A722D72555AA093D9C88D30534F4A7B60FE80F1DA7E8EDBE + 4F681AF72F6D8A5902259E49347C880F2FBEBF15CA9A8A078BA25C001574F1F0 + 16CB77A937716178BDAD999A073E957D240D89DB4C2CC16A5B8C252F9430966C + 5ECE787972721D3A8BE1DC94B731C9C989B838683CD9F5C81485C2D3E4C0503F + 4B1BA380D8AA480C8F1BC7A97B6DFC165D1D1FA6DE0C1E519E60392A7A1F6EF6 + 37310F3F00681ACE2FE90AA2ACB03BF7D87B17CED1818E93529816A92C235997 + D958651C45185DC265D31B1BEF80CF4F258C896D7299F1D65653FD0E664D8235 + 9FFA97638FBDB47A23AD7D907F4AFC2C7BCC4CC2AC13332B6E0BF0E282B1976D + 2B0DEEE0548BA41CE1A891A2CB65DFE27CC9573BB329116039C479A980C64C3E + B74045C4C4874EA8ED88CFE0828993218F6DA4FB9298595D195755BC18179F08 + 1D5B8C5567F6522A95E2DF13333ACEDF984D2A6427664831EB165B7C863DB865 + 06D50705377AF52BC60A3E9558615B7005582F0F14D3934BAA69454525839692 + 9393939F4072A4DB9C9BCBD29D7BACF9A30E7ABDB3557E855D545242D5E50FD0 + 932B6A695DD50A3C4A15FA078C99266B364BF9FC4A7CF92FC6D7A005604BB158 + 6CB8B3B3737763636327CC3043E0CCAF18BB76EDF2E392DB0176A9ADE762FA8D + D6F7D26D573E4EE3A1361D4D24E40F82FB81D054726A6AEA6F7BF7EEE5BFBA16 + 83ED1F1399343434F4582291E836E384124EF2BE69C44B68CA999999693974E8 + 50635959D943289FFFA9E0EF4CD9DB2B12893C87CB67C88CBD2F291A8DA2C4F8 + D58989893F3737376FDEB061035FF7F9DFD605E0B9FF46C2FEDA8DD539180C06 + 971A2883B09A9C9BFF511CC029F00FC77142D00BBBFE7E7692795063044DF5B7 + B6B67EBC67CF9E31405C8F65FDA30194D1188EC48F205E436395DC04743E0753 + B8220D62D9CFC07F656464E4C2AD5BB742EDEDEDE3972F5FC66D474912FC8F29 + 1008A4C7C7C7D367CF9E4D62DBF06FB3CCFC230B4BAEC1ADC36D6CDFBE7DBEA6 + A626FECF790FCC1456630877F4AE9E9E9E77BABBBBAF0D0E0E86474747636828 + 7EFAF469FB9FAF3D4296EF16D926787E965935B88D1D3972C4BF7DFBF6E7708A + 05B02AA3478F1E1D7AEBADB7A2A150283D3C3CCC83F9A870229BCCDB14939BF4 + 2E919DDB5B834BDE53917566BE4930DBCBA66DC07B74AC64CA4A7A9769CEF9BD + 8D31B1CD0D792F993CD036C374BF349493E66ACC2B2DD9E63EA77B4B44FF0112 + 860F7F82047C820000000049454E44AE426082} FileName = 'C:\src\Delphi\ntfy-for-delphi\samples\vcl\subscriber\Ntfy-54x.ic' + 'o' @@ -3331,8 +3331,4 @@ object ViewMain: TViewMain Left = 256 Top = 8 end - object PushEvents1: TPushEvents - Left = 48 - Top = 600 - end end diff --git a/samples/android/publisher/src/View.Main.pas b/samples/android/publisher/src/View.Main.pas index 0a9cc82..db6999e 100644 --- a/samples/android/publisher/src/View.Main.pas +++ b/samples/android/publisher/src/View.Main.pas @@ -6,9 +6,7 @@ interface System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Layouts, FMX.Controls.Presentation, FMX.StdCtrls, FMX.Objects, FMX.Edit, - FMX.Memo.Types, FMX.ScrollBox, FMX.Memo, REST.Backend.PushTypes, System.JSON, - System.PushNotification, Data.Bind.Components, Data.Bind.ObjectScope, - REST.Backend.BindSource, REST.Backend.PushDevice; + FMX.Memo.Types, FMX.ScrollBox, FMX.Memo; type TViewMain = class(TForm) @@ -29,7 +27,6 @@ TViewMain = class(TForm) Layout8: TLayout; edtTopic: TEdit; btnPublish: TCornerButton; - PushEvents1: TPushEvents; procedure btnPublishClick(Sender: TObject); private procedure SendNotification;