This commit is contained in:
wangcongtao
2020-06-12 11:55:48 +08:00
parent f29bcab11d
commit a411944a29
10 changed files with 77 additions and 44 deletions

View File

@@ -116,6 +116,11 @@ public class MogoStatusManager implements IMogoStatusManager {
return get_bool_val( StatusDescriptor.UPLOADING );
}
@Override
public boolean isMainPageLaunched() {
return get_bool_val( StatusDescriptor.MAIN_PAGE_CREATED );
}
private boolean get_bool_val( StatusDescriptor descriptor ) {
Boolean val = mStatus.get( descriptor );
return val == null ? false : val;
@@ -193,6 +198,11 @@ public class MogoStatusManager implements IMogoStatusManager {
doSetStatus( tag, StatusDescriptor.UPLOADING, uploading );
}
@Override
public void setMainPageLaunchedStatus( String tag, boolean launched ) {
doSetStatus( tag, StatusDescriptor.MAIN_PAGE_CREATED, launched );
}
private void doSetStatus( String tag, StatusDescriptor target, boolean value ) {
mStatus.put( target, value );
invokeStatusChangedListener( target, value );