mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-20 04:35:32 +00:00
Merge branch 'ubilabs--rcapp--bug-3694'
This commit is contained in:
+1
@@ -13,6 +13,7 @@ public class AppConstants {
|
||||
public final static String EXTRAS_RACE_STATE_EVENT = "raceStateEvent";
|
||||
public final static String FLAG_KEY = "raceFlag";
|
||||
public final static String EXTRAS_WIND_FIX = "windfix";
|
||||
public final static String EXTRA_FORCE_REFRESH = "forceRefresh";
|
||||
|
||||
public final static String AUTHOR_TYPE_OFFICER_START = "Race Officer on Start Vessel";
|
||||
public final static String AUTHOR_TYPE_OFFICER_FINISH = "Race Officer on Finish Vessel";
|
||||
|
||||
+9
-4
@@ -521,8 +521,13 @@ public class LoginActivity extends BaseActivity
|
||||
return ObjectAnimator.ofFloat(target, "alpha", 1f, 0f);
|
||||
}
|
||||
|
||||
private void resetData() {
|
||||
if (backdrop.getY() != 0) {
|
||||
/**
|
||||
* Reset the data (reload from server)
|
||||
*
|
||||
* @param force Reload data, even if the backdrop is moved up
|
||||
*/
|
||||
private void resetData(boolean force) {
|
||||
if (!force && backdrop.getY() != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -543,9 +548,9 @@ public class LoginActivity extends BaseActivity
|
||||
String action = intent.getAction();
|
||||
|
||||
if (AppConstants.INTENT_ACTION_RESET.equals(action)) {
|
||||
resetData();
|
||||
resetData(intent.getBooleanExtra(AppConstants.EXTRA_FORCE_REFRESH, false));
|
||||
} else if (AppConstants.INTENT_ACTION_VALID_DATA.equals(action)) {
|
||||
resetData();
|
||||
resetData(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -168,6 +168,7 @@ public class LoginBackdrop extends Fragment implements LoginTask.LoginTaskListen
|
||||
|
||||
private void refreshData() {
|
||||
Intent intent = new Intent(AppConstants.INTENT_ACTION_RESET);
|
||||
intent.putExtra(AppConstants.EXTRA_FORCE_REFRESH, true);
|
||||
BroadcastManager.getInstance(getActivity()).addIntent(intent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user