mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Fixed flickering of nearby banner compass (#5486)
This commit is contained in:
parent
9e970123fd
commit
5661e8c332
2 changed files with 4 additions and 5 deletions
|
|
@ -542,7 +542,7 @@ public class ContributionsFragment
|
|||
String distance = formatDistanceBetween(curLatLng, closestNearbyPlace.location);
|
||||
closestNearbyPlace.setDistance(distance);
|
||||
direction = (float) computeBearing(curLatLng, closestNearbyPlace.location);
|
||||
nearbyNotificationCardView.updateContent(closestNearbyPlace, direction);
|
||||
nearbyNotificationCardView.updateContent(closestNearbyPlace);
|
||||
} else {
|
||||
// Means that no close nearby place is found
|
||||
nearbyNotificationCardView.setVisibility(View.GONE);
|
||||
|
|
|
|||
|
|
@ -113,11 +113,11 @@ public class NearbyNotificationCardView extends SwipableCardView {
|
|||
}
|
||||
|
||||
/**
|
||||
* Pass place information to views and set compass arrow direction
|
||||
* Pass place information to views
|
||||
*
|
||||
* @param place Closes place where we will get information from
|
||||
* @param direction Direction in which compass arrow needs to be set
|
||||
*/
|
||||
public void updateContent(Place place, float direction) {
|
||||
public void updateContent(Place place) {
|
||||
Timber.d("Update nearby card notification content");
|
||||
this.setVisibility(VISIBLE);
|
||||
cardViewVisibilityState = CardViewVisibilityState.READY;
|
||||
|
|
@ -132,7 +132,6 @@ public class NearbyNotificationCardView extends SwipableCardView {
|
|||
notificationIcon.setVisibility(VISIBLE);
|
||||
notificationTitle.setText(place.name);
|
||||
notificationDistance.setText(place.distance);
|
||||
notificationCompass.setRotation(direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue