[Sprint/GiddyGiraffe] (fix): gathering button should stop pulsating after the gathering ends
closes #1412
0/1 discussion resolved
added 1 commit
- 77c2bd05 - (fix): gathering button should stop pulsating after the gathering ends
approved this merge request
unapproved this merge request
181 181 this.updateMarkersSubscription.unsubscribe(); 182 182 183 183 this.updateMarkersSubscription = this.updateMarkers.getByEntityGuid(this.guid).subscribe((marker => { 184 // this.updateMarkersSubscription = this.updateMarkers.markers.subscribe(markers => { 184 185 if (!marker) 185 186 return; 186 187 187 this.group.hasGathering = marker && marker.entity_guid == this.group.guid 188 && marker.marker == 'gathering-heartbeat' 189 && marker.updated_timestamp > (Date.now() / 1000) - 60; 188 this.group.hasGathering$ = interval(1000).pipe( 189 throttle(() => interval(2000)), //only allow once per 2 seconds 190 startWith(0), 191 map(() => [marker].filter(marker => marker.entity_guid == this.group.guid - Developer
Is there a way to ditch the [marker].filter(...).length > 0 and use the condition as-is? Seems overly verbose.
Edited by Emiliano Balbuena