Merge pull request #7944 from osmandapp/plugins_fixes

Fix select profile type listener
This commit is contained in:
max-klaus 2019-11-18 16:54:24 +03:00 committed by GitHub
commit 124cc6590f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 4 deletions

View file

@ -221,7 +221,7 @@ public class SelectProfileBottomSheetDialogFragment extends MenuBottomSheetDialo
if (activity != null) { if (activity != null) {
FragmentManager fragmentManager = activity.getSupportFragmentManager(); FragmentManager fragmentManager = activity.getSupportFragmentManager();
EditProfileFragment editProfileFragment = (EditProfileFragment) fragmentManager.findFragmentByTag(EditProfileFragment.TAG); EditProfileFragment editProfileFragment = (EditProfileFragment) fragmentManager.findFragmentByTag(EditProfileFragment.TAG);
SettingsProfileFragment settingsProfileFragment = (SettingsProfileFragment) fragmentManager.findFragmentByTag(SettingsProfileFragment.TAG); SettingsProfileFragment settingsProfileFragment = (SettingsProfileFragment) fragmentManager.findFragmentByTag(SettingsProfileFragment.class.getName());
if (editProfileFragment != null) { if (editProfileFragment != null) {
switch (type) { switch (type) {

View file

@ -19,7 +19,7 @@ public class SettingsProfileActivity extends OsmandActionBarActivity {
SettingsProfileFragment profileFragment = new SettingsProfileFragment(); SettingsProfileFragment profileFragment = new SettingsProfileFragment();
profileFragment.setArguments(getIntent().getExtras()); profileFragment.setArguments(getIntent().getExtras());
getSupportFragmentManager().beginTransaction() getSupportFragmentManager().beginTransaction()
.add(android.R.id.content, profileFragment, SettingsProfileFragment.TAG).commit(); .add(android.R.id.content, profileFragment, SettingsProfileFragment.class.getName()).commit();
} }
} }

View file

@ -45,8 +45,6 @@ public class SettingsProfileFragment extends BaseOsmAndFragment
private static final Log LOG = PlatformUtil.getLog(SettingsProfileFragment.class); private static final Log LOG = PlatformUtil.getLog(SettingsProfileFragment.class);
public static final String TAG = "SettingsProfileFragment";
public static final String PROFILE_STRING_KEY = "string_key"; public static final String PROFILE_STRING_KEY = "string_key";
public static final String IS_NEW_PROFILE = "new_profile"; public static final String IS_NEW_PROFILE = "new_profile";
public static final String IS_USER_PROFILE = "user_profile"; public static final String IS_USER_PROFILE = "user_profile";