mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-21 15:29:18 -04:00
Return to SearchResults on "Up" navigation from AppDetails
When arriving to the AppDetails screen from SearchResults, the Up navigation should return to SearchResults screen and not its actual parent.
This commit is contained in:
@@ -129,6 +129,7 @@ public class AppDetails extends AppCompatActivity implements ProgressListener, A
|
||||
|
||||
public static final String EXTRA_APPID = "appid";
|
||||
public static final String EXTRA_FROM = "from";
|
||||
public static final String EXTRA_HINT_SEARCHING = "searching";
|
||||
|
||||
private FDroidApp fdroidApp;
|
||||
private ApkListAdapter adapter;
|
||||
@@ -769,7 +770,11 @@ public class AppDetails extends AppCompatActivity implements ProgressListener, A
|
||||
switch (item.getItemId()) {
|
||||
|
||||
case android.R.id.home:
|
||||
navigateUp();
|
||||
if (getIntent().hasExtra(EXTRA_HINT_SEARCHING)) {
|
||||
finish();
|
||||
} else {
|
||||
navigateUp();
|
||||
}
|
||||
return true;
|
||||
|
||||
case LAUNCH:
|
||||
|
||||
@@ -111,6 +111,7 @@ public class SearchResultsFragment extends ListFragment implements LoaderManager
|
||||
|
||||
Intent intent = new Intent(getActivity(), AppDetails.class);
|
||||
intent.putExtra(AppDetails.EXTRA_APPID, app.id);
|
||||
intent.putExtra(AppDetails.EXTRA_HINT_SEARCHING, true);
|
||||
startActivityForResult(intent, REQUEST_APPDETAILS);
|
||||
super.onListItemClick(l, v, position, id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user