Rca/fix UI #15
|
@ -160,7 +160,6 @@ public class MainActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
Log.d("onResume", "called");
|
Log.d("onResume", "called");
|
||||||
if (mDocRef == null) {
|
|
||||||
Log.d("onResume", "mDocRef is null");
|
Log.d("onResume", "mDocRef is null");
|
||||||
SharedPreferences sharedPreferences = getSharedPreferences("app_situation", MODE_PRIVATE);
|
SharedPreferences sharedPreferences = getSharedPreferences("app_situation", MODE_PRIVATE);
|
||||||
String IdPref = sharedPreferences.getString("ID", null);
|
String IdPref = sharedPreferences.getString("ID", null);
|
||||||
|
@ -169,12 +168,8 @@ public class MainActivity extends AppCompatActivity {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mDocRef = FirebaseFirestore.getInstance().document("users/" + IdPref);//現在の位置を取得
|
mDocRef = FirebaseFirestore.getInstance().document("users/" + IdPref);//現在の位置を取得
|
||||||
|
this.flg = false;
|
||||||
initNotification(mDocRef);
|
initNotification(mDocRef);
|
||||||
}
|
|
||||||
|
|
||||||
if (mDocRef.getId().equals(null)) {
|
|
||||||
Log.d("onResume", "mDocRef.getId() is null");
|
|
||||||
}
|
|
||||||
|
|
||||||
super.onResume();
|
super.onResume();
|
||||||
}
|
}
|
||||||
|
@ -218,7 +213,9 @@ public class MainActivity extends AppCompatActivity {
|
||||||
// SupportFragmentManagerが現在表示しているFragmentを取得
|
// SupportFragmentManagerが現在表示しているFragmentを取得
|
||||||
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragmentContainerView);
|
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragmentContainerView);
|
||||||
if (fragment instanceof HomeFragment) {
|
if (fragment instanceof HomeFragment) {
|
||||||
((HomeFragment) fragment).updateUiState(!isInCar);
|
((HomeFragment) fragment).onEvent(!isInCar);
|
||||||
|
} else {
|
||||||
|
Log.d("nt", "HomeFragment is not visible");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user