Idx: Integer;
ATitle: string;
DownloadResult: Boolean;
- foundPos: Integer;
boardPlugIn : TBoardPlugIn;
- listContent : string;
lastContent : string;
logFile : TFileStream;
adjustMargin : Integer;
NewRes: Integer;
finish : Boolean;
loopCnt : Integer;
- KokoTxt : string;
- KokoIdx : Integer;
- NewTxt : string;
- NewIdx : Integer;
- LastTxt : string;
+// KokoTxt : string;
+// KokoIdx : Integer;
+// NewTxt : string;
+// NewIdx : Integer;
+// LastTxt : string;
LastIdx : Integer;
begin
FileName := ThreadItem.GetThreadFileName;
Body.Text := Content;
if (ThreadItem.Kokomade > 0) and (ThreadItem.Kokomade <= oldBody.Count) then begin
- ThreadItem.Kokomade := Body.IndexOf(oldBody.Strings[ ThreadItem.Kokomade - 1 ]) + 1;
+ ThreadItem.Kokomade := Body.IndexOf(oldBody.Strings[ ThreadItem.Kokomade - 1 ]);
+ if ThreadItem.Kokomade <> -1 then ThreadItem.Kokomade := ThreadItem.Kokomade + 1;
end;
LastIdx := oldBody.Count;
OldCnt := Body.IndexOf(oldBody.Strings[ LastIdx ]) + 1;
until ( OldCnt <> 0 ) or (LastIdx = 0);
+ if OldCnt >= Body.Count then OldCnt := Body.Count - 1;
NewRes := Body.Count - OldCnt;
+
finally
oldBody.Free;
end;
ThreadItem.AllResCount := ThreadItem.Count;
ThreadItem.IsLogFile := True;
ThreadItem.RoundDate := Now;
- ThreadItem.UnRead := True;
- ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1;
+ if not ThreadItem.UnRead then begin
+ ThreadItem.UnRead := True;
+ ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead + 1;
+ end;
// if ThreadItem.RoundNo = 6 then
// ThreadItem.RoundNo := 0;