mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fix visibility error on media details view (#2009)
This commit is contained in:
parent
f607c1c14d
commit
e9bfc4bc7a
3 changed files with 4 additions and 4 deletions
|
|
@ -546,7 +546,6 @@ public class ContributionsFragment
|
|||
|
||||
|
||||
private void updateClosestNearbyCardViewInfo() {
|
||||
|
||||
curLatLng = locationManager.getLastLocation();
|
||||
|
||||
placesDisposable = Observable.fromCallable(() -> nearbyController
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ import fr.free.nrw.commons.MediaDataExtractor;
|
|||
import fr.free.nrw.commons.MediaWikiImageView;
|
||||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.category.CategoryDetailsActivity;
|
||||
import fr.free.nrw.commons.contributions.ContributionsFragment;
|
||||
import fr.free.nrw.commons.delete.DeleteTask;
|
||||
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
|
||||
import fr.free.nrw.commons.location.LatLng;
|
||||
|
|
@ -204,12 +205,14 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment {
|
|||
};
|
||||
view.getViewTreeObserver().addOnGlobalLayoutListener(layoutListener);
|
||||
locale = getResources().getConfiguration().locale;
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
((ContributionsFragment)(getParentFragment().getParentFragment())).nearbyNoificationCardView.setVisibility(View.GONE);
|
||||
media = detailProvider.getMediaAtPosition(index);
|
||||
if (media == null) {
|
||||
// Ask the detail provider to ping us when we're ready
|
||||
|
|
|
|||
|
|
@ -201,9 +201,7 @@ public class NearbyNoificationCardView extends CardView{
|
|||
* @param place Closes place where we will get information from
|
||||
*/
|
||||
public void updateContent(boolean isClosestNearbyPlaceFound, Place place) {
|
||||
if (this.getVisibility() == GONE) {
|
||||
return; // If nearby card view is invisible because of preferences, do nothing
|
||||
}
|
||||
Timber.d("Update nearby card notification content");
|
||||
cardViewVisibilityState = CardViewVisibilityState.READY;
|
||||
permissionRequestButton.setVisibility(GONE);
|
||||
contentLayout.setVisibility(VISIBLE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue