Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kisspeace committed Aug 16, 2022
1 parent fbcad3a commit 629a3cf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
3 changes: 2 additions & 1 deletion source/NsfwBoxGraphics.pas
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ constructor TNBoxCardBase.Create(Aowner: TComponent);

destructor TNBoxCardBase.Destroy;
begin

// if Assigned(FItem) then // !!!!
// ( FItem as TInterfacedPersistent ).Free;
inherited;
end;

Expand Down
40 changes: 23 additions & 17 deletions source/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ interface
// NsfwBox
NsfwBoxInterfaces, NsfwBoxSettings, NsfwBoxGraphics, NsfwBoxContentScraper,
NsfwBoxOriginPseudo, NsfwBoxOriginNsfwXxx, NsfwBoxOriginR34App,
NsfwBoxOriginR34JsonApi, NsfwBoxOriginBookmarks, NsfwBoxOriginConst,
NsfwBoxOriginR34JsonApi, NsfwBoxOriginBookmarks,
NsfwBoxOriginCoomerParty, NsfwBoxOriginConst,
NsfwBoxGraphics.Browser, NsfwBoxStyling, NsfwBoxGraphics.Rectangle,
NsfwBoxDownloadManager, NsfwBoxBookmarks, NsfwBoxHelper,
NsfwBox.UpdateChecker, NsfwBox.MessageForDeveloper, Unit2;
Expand Down Expand Up @@ -1237,19 +1238,9 @@ procedure TForm1.ConnectSession;
end;

function RandReq: INBoxSearchRequest;
var
N: integer;
begin
Result := nil;
N := Random(3);

case N of
0: result := TNBoxSearchReqR34JsonApi.Create;
1: result := TNBoxSearchReqR34App.Create;
2: Result := TNBoxSearchReqNsfwxxx.Create;
end;
if Not Assigned(Result) then
Result := TNBoxSearchReqR34App.Create;
Result := TNBoxSearchReqNsfwxxx.Create;
end;

function TForm1.CreateDefBrowser(AOwner: TComponent): TNBoxBrowser;
Expand Down Expand Up @@ -1478,10 +1469,26 @@ function TForm1.CreateDefText(AOwner: TComponent; AStyle: integer): TAlText;
end;

function TForm1.CreateTabText(ABrowser: TNBoxBrowser): string;
var
Req: INBoxSearchRequest;
begin
Result := ABrowser.Request.Request;
if Result.IsEmpty then
Result := 'empty';
Req := ABrowser.Request;

Result := Req.Request;
if ( Result.IsEmpty ) then begin

if ( Req is TNBoxSearchReqCoomerParty ) then begin
var LReq: TNBoxSearchReqCoomerParty;
LReq := (Req as TNBoxSearchReqCoomerParty);
if ( not LReq.UserId.IsEmpty ) then
Result := LReq.UserId;
end;

if ( Result.IsEmpty ) then
Result := 'empty';

end;

Result := Result + ': ' + ABrowser.Request.PageId.ToString + ' | '
+ ABrowser.Items.Count.ToString;
end;
Expand Down Expand Up @@ -2425,7 +2432,6 @@ procedure TForm1.OnBrowserReqChanged(Sender: TObject);
Bookmark := TNBoxBookmark.Create(B.Request);
Group.Add(Bookmark);
B.Tag := Group.GetMaxId;
//showmessage(B.Tag.ToString);
Bookmark.Free;
end;
end;
Expand Down Expand Up @@ -2473,7 +2479,7 @@ procedure TForm1.OnBrowserSetWebClient(Sender: TObject;
procedure TForm1.OnBrowsersNotify(Sender: TObject; const Item: TNBoxBrowser;
Action: TCollectionNotification);
begin
Self.TopBottomText.Text := 'Browsers: ' + Browsers.Count.ToString;
//Self.TopBottomText.Text := 'Browsers: ' + Browsers.Count.ToString;
end;

procedure TForm1.OnCardAutoLook(Sender: TObject);
Expand Down

0 comments on commit 629a3cf

Please sign in to comment.