OSDN Git Service

・今まで 1 つ固定であった BBS が複数持てるようになった。
[gikonavigoeson/gikonavi.git] / Round.pas
index 6d8fa8f..2799088 100644 (file)
--- a/Round.pas
+++ b/Round.pas
@@ -89,7 +89,7 @@ begin
                if not RoundItem.BoolData then Continue;
                if not Giko.GikoForm.LoginAction.Checked then Exit;
                if RoundItem.RoundType = grtBoard then begin
-                       Board := BBS2ch.FindBBSID(RoundItem.BBSID);
+                       Board := TBoard( RoundItem.Item );
                        if Board <> nil then begin
                                if not Board.IsThreadDatRead then
                                        GikoSys.ReadSubjectFile(Board);
@@ -101,11 +101,8 @@ begin
                RoundItem := RoundList.Items[i, grtItem];
                if not RoundItem.BoolData then Continue;
                if not Giko.GikoForm.LoginAction.Checked then Exit;
-               Board := BBS2ch.FindBBSID(RoundItem.BBSID);
-               if Board <> nil then begin
-                       if not Board.IsThreadDatRead then
-                               GikoSys.ReadSubjectFile(Board);
-                       ThreadItem := BBS2ch.FindThreadItem(RoundItem.BBSID, RoundItem.FileName);
+    if RoundItem.RoundType = grtItem then begin
+       ThreadItem := TThreadItem( RoundItem.Item );
                        if ThreadItem <> nil then begin
 //                             GikoForm.AddMessageList('debug2:' + IntToStr(i), nil);
                                GikoForm.DownloadContent(ThreadItem);
@@ -271,15 +268,13 @@ begin
                        Exit;
                if TObject(RoundListView.Selected.Data) is TRoundItem then begin
                        RoundItem := TRoundItem(RoundListView.Selected.Data);
-                       Board := BBS2ch.FindBBSID(RoundItem.BBSID);
                        if RoundItem.RoundType = grtBoard then begin
+                               Board := TBoard( RoundItem.Item );
                                RoundList.Delete(Board);
                                Board.Round := False;
                                Board.RoundName := '';
                        end else begin
-                               if not Board.IsThreadDatRead then
-                                       GikoSys.ReadSubjectFile(Board);
-                               ThreadItem := BBS2ch.FindThreadItem(RoundItem.BBSID, RoundItem.FileName);
+                               ThreadItem := TThreadItem( RoundItem.Item );
                                RoundList.Delete(ThreadItem);
                                ThreadItem.Round := False;
                                ThreadItem.RoundName := '';