Skip to content

Commit 23798e7

Browse files
committed
♻️ Refactoring after merged with main
1 parent b556413 commit 23798e7

File tree

9 files changed

+27
-35
lines changed

9 files changed

+27
-35
lines changed

samples/android/publisher/AndroidPublisher.dproj

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -322,24 +322,24 @@
322322
<Overwrite>true</Overwrite>
323323
</Platform>
324324
</DeployFile>
325-
<DeployFile LocalName="Android64\Debug\colors.xml" Configuration="Debug" Class="Android_Colors">
325+
<DeployFile LocalName="$(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png" Configuration="Debug" Class="Android_NotificationIcon24">
326326
<Platform Name="Android64">
327+
<RemoteName>ic_notification.png</RemoteName>
327328
<Overwrite>true</Overwrite>
328329
</Platform>
329330
</DeployFile>
330-
<DeployFile LocalName="Android64\Debug\AndroidManifest.xml" Configuration="Debug" Class="ProjectAndroidManifest">
331+
<DeployFile LocalName="Android64\Debug\styles.xml" Configuration="Debug" Class="AndroidSplashStyles">
331332
<Platform Name="Android64">
332333
<Overwrite>true</Overwrite>
333334
</Platform>
334335
</DeployFile>
335-
<DeployFile LocalName="Android64\Debug\styles.xml" Configuration="Debug" Class="AndroidSplashStyles">
336+
<DeployFile LocalName="Android64\Debug\colors.xml" Configuration="Debug" Class="Android_Colors">
336337
<Platform Name="Android64">
337338
<Overwrite>true</Overwrite>
338339
</Platform>
339340
</DeployFile>
340-
<DeployFile LocalName="$(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png" Configuration="Debug" Class="Android_NotificationIcon24">
341+
<DeployFile LocalName="Android64\Debug\AndroidManifest.xml" Configuration="Debug" Class="ProjectAndroidManifest">
341342
<Platform Name="Android64">
342-
<RemoteName>ic_notification.png</RemoteName>
343343
<Overwrite>true</Overwrite>
344344
</Platform>
345345
</DeployFile>
@@ -1184,11 +1184,6 @@
11841184
<Platforms>
11851185
<Platform value="Android">True</Platform>
11861186
<Platform value="Android64">True</Platform>
1187-
<Platform value="iOSDevice32">False</Platform>
1188-
<Platform value="iOSDevice64">False</Platform>
1189-
<Platform value="iOSSimulator">False</Platform>
1190-
<Platform value="OSX32">False</Platform>
1191-
<Platform value="OSX64">False</Platform>
11921187
<Platform value="Win32">True</Platform>
11931188
<Platform value="Win64">True</Platform>
11941189
</Platforms>

samples/win-service/NtfyService.dproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
<Base>true</Base>
5757
</PropertyGroup>
5858
<PropertyGroup Condition="'$(Base)'!=''">
59-
<DCC_DcuOutput>..\..\lib</DCC_DcuOutput>
60-
<DCC_ExeOutput>..\..\bin</DCC_ExeOutput>
59+
<DCC_DcuOutput>..\..\lib\$(Platform)</DCC_DcuOutput>
60+
<DCC_ExeOutput>..\..\bin\$(Platform)</DCC_ExeOutput>
6161
<DCC_E>false</DCC_E>
6262
<DCC_N>false</DCC_N>
6363
<DCC_S>false</DCC_S>
@@ -104,7 +104,6 @@
104104
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
105105
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
106106
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
107-
<VerInfo_Locale>1033</VerInfo_Locale>
108107
</PropertyGroup>
109108
<PropertyGroup Condition="'$(Cfg_2)'!=''">
110109
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>

samples/win-service/NtfyService.res

0 Bytes
Binary file not shown.

src/Notify.Api.Factory.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function TNotifyApiFactory.Api: INotifyApi;
2626
Result := TNotifyApiIndy.New
2727
{$ELSE}
2828
Result := TNotifyApiNetHTTP.New;
29-
{$IFEND}
29+
{$ENDIF}
3030
end;
3131

3232
class function TNotifyApiFactory.New: INotifyApiFactory;

src/Notify.Api.Indy.pas

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ destructor TNotifyApiIndy.Destroy;
214214
try
215215
Destroythread;
216216
finally
217-
FreeAndNil(FResponse);
218-
FreeAndNil(FIdHTTP);
219-
FreeAndNil(FIOHandlerSSL);
220-
FreeAndNil(FURLParametersList);
221-
FreeAndNil(FBodyStream);
217+
FResponse.Free;
218+
FIdHTTP.Free;
219+
FIOHandlerSSL.Free;
220+
FURLParametersList.Free;
221+
FBodyStream.Free;
222222
end;
223223
inherited;
224224
end;
@@ -337,14 +337,12 @@ destructor TSSEThread.Destroy;
337337
procedure TSSEThread.DoOnWork(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Int64);
338338
var
339339
LEventString: UTF8String;
340-
340+
LString: UTF8String;
341341
{$IFDEF VER310}
342342
LStrings: TStringDynArray;
343343
{$ELSE}
344-
LStrings: TArray<string>;
344+
LStrings: TArray<String>;
345345
{$ENDIF}
346-
347-
LString: UTF8String;
348346
begin
349347

350348
if Terminated then
@@ -359,10 +357,10 @@ procedure TSSEThread.DoOnWork(ASender: TObject; AWorkMode: TWorkMode; AWorkCount
359357
if LEventString = FCloseConnectionMessage then
360358
FIdHttp.Socket.Close;
361359

362-
LStrings := SplitString(LEventString, #$A);
360+
LStrings := SplitString(UTF8ToString(LEventString), #$A);
363361

364362
for LString in LStrings do
365-
NxHorizon.Instance.Post<TNotifySubscriptionEvent>(LString);
363+
NxHorizon.Instance.Post<TNotifySubscriptionEvent>(UTF8ToString(LString));
366364

367365
end;
368366

src/Notify.Api.Response.pas

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ TNotifyApiResponse = class
2424
FStatusCode: Int64;
2525
{$ENDIF}
2626
FResponseStream: TMemoryStream;
27-
FResponseData: TNotifyResponseData;
27+
FResponseData: TNotifyResponseDTO;
2828
FResponseErrors: TNotifyErrors;
2929
function GetErros: TNotifyErrors;
30-
function GetData: TNotifyResponseData;
30+
function GetData: TNotifyResponseDTO;
3131
public
3232
constructor Create;
3333
destructor Destroy; override;
3434
published
3535
property Erros: TNotifyErrors read GetErros;
36-
property Data: TNotifyResponseData read GetData;
36+
property Data: TNotifyResponseDTO read GetData;
3737
property {$IFDEF WIN32} StatusCode: Integer {$ELSE} StatusCode: Int64 {$ENDIF} read FStatusCode write FStatusCode;
3838
property ResponseStream: TMemoryStream read FResponseStream write FResponseStream;
3939
end;
@@ -47,7 +47,7 @@ implementation
4747

4848
constructor TNotifyApiResponse.Create;
4949
begin
50-
FResponseData := TNotifyResponseData.Create;
50+
FResponseData := TNotifyResponseDTO.Create;
5151
FResponseErrors := TNotifyErrors.Create;
5252
FResponseStream := TMemoryStream.Create
5353
end;
@@ -60,7 +60,7 @@ destructor TNotifyApiResponse.Destroy;
6060
inherited
6161
end;
6262

63-
function TNotifyApiResponse.GetData: TNotifyResponseData;
63+
function TNotifyApiResponse.GetData: TNotifyResponseDTO;
6464
var
6565
LRawString: String;
6666
begin

src/Notify.Core.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ procedure TNotifyCore.ConsoleLogEvent;
199199
LTag: String;
200200
LAction: INotifyAction;
201201
LAttachment: INotifyAttachment;
202-
{$ENDIF}
202+
{$ENDIF}
203203
begin
204204

205205
if not FConfig.SaveLog then

tests/NtfyForDelphiTests.dproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<FrameworkType>None</FrameworkType>
66
<Base>True</Base>
77
<Config Condition="'$(Config)'==''">Debug</Config>
8-
<Platform Condition="'$(Platform)'==''">Win64</Platform>
8+
<Platform Condition="'$(Platform)'==''">Win32</Platform>
99
<TargetedPlatforms>3</TargetedPlatforms>
1010
<AppType>Console</AppType>
1111
<MainSource>NtfyForDelphiTests.dpr</MainSource>
@@ -46,8 +46,8 @@
4646
<Base>true</Base>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Base)'!=''">
49-
<DCC_DcuOutput>..\..\..\lib\$(Platform)</DCC_DcuOutput>
50-
<DCC_ExeOutput>..\..\..\bin\$(Platform)</DCC_ExeOutput>
49+
<DCC_DcuOutput>..\lib\$(Platform)</DCC_DcuOutput>
50+
<DCC_ExeOutput>..\bin\$(Platform)</DCC_ExeOutput>
5151
<DCC_E>false</DCC_E>
5252
<DCC_N>false</DCC_N>
5353
<DCC_S>false</DCC_S>

tests/src/Test.Attachments.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ procedure TTestAttachments.Publish;
6666
procedure TTestAttachments.SetUp;
6767
begin
6868
inherited;
69-
FFilePath := '..\img\delphi-notify.png';
69+
FFilePath := '..\..\img\delphi-notify.png';
7070
FFileName := ExtractFileName(FFilePath);
7171
end;
7272

0 commit comments

Comments
 (0)