forked from j62/ctbrec
1
0
Fork 0

Fix isOnline for SHowupModel

This commit is contained in:
0xboobface 2020-05-16 21:34:39 +02:00
parent 1a5c32167e
commit 39c1fd94ba
1 changed files with 8 additions and 6 deletions

View File

@ -28,14 +28,16 @@ public class ShowupModel extends AbstractModel {
@Override @Override
public boolean isOnline(boolean ignoreCache) throws IOException, ExecutionException, InterruptedException { public boolean isOnline(boolean ignoreCache) throws IOException, ExecutionException, InterruptedException {
if(ignoreCache) {
List<Model> modelList = getShowupSite().getModelList(); List<Model> modelList = getShowupSite().getModelList();
for (Model model : modelList) { for (Model model : modelList) {
ShowupModel m = (ShowupModel) model; ShowupModel m = (ShowupModel) model;
if (m.getUid() == uid) { if (m.getUid() == uid) {
return m.getOnlineState(false) != State.ONLINE; setOnlineState(m.getOnlineState(false));
} }
} }
return false; }
return getOnlineState(false) == State.ONLINE;
} }
@Override @Override