forked from j62/ctbrec
1
0
Fork 0

Don't show login, if credentails are missing

This commit is contained in:
0xboobface 2019-01-19 17:45:58 +01:00
parent 11f2a3ef8d
commit 9cf5e4c41c
2 changed files with 7 additions and 3 deletions

View File

@ -71,8 +71,12 @@ public class LiveJasminTab extends ThumbOverviewTab {
@Override
protected void onFail(WorkerStateEvent event) {
status.setText("Login failed");
super.onFail(event);
if(Config.getInstance().getSettings().livejasminBetaAcknowledged) {
status.setText("Login failed");
grid.getChildren().remove(acknowledge);
grid.getChildren().remove(createAccount);
super.onFail(event);
}
}
@Override

View File

@ -42,7 +42,7 @@ public class LiveJasminUpdateService extends PaginatedScheduledService {
@Override
public List<Model> call() throws IOException, NotLoggedInExcetion {
//String _url = url + ((page-1) * 36); // TODO find out how to switch pages
if(!SiteUiFactory.getUi(liveJasmin).login()) {
if(!liveJasmin.credentialsAvailable() || !SiteUiFactory.getUi(liveJasmin).login()) {
throw new NotLoggedInExcetion();
}