[gnome-maps/gnome-3-38] placeEntry: Show error message on search failure
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/gnome-3-38] placeEntry: Show error message on search failure
- Date: Mon, 28 Sep 2020 21:07:08 +0000 (UTC)
commit 46f82c4ae9a36afbb23dc685f49c2049e79fc354
Author: Marcus Lundblad <ml update uu se>
Date: Tue Sep 22 22:21:41 2020 +0200
placeEntry: Show error message on search failure
src/placeEntry.js | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/placeEntry.js b/src/placeEntry.js
index a1c4501a..494784d9 100644
--- a/src/placeEntry.js
+++ b/src/placeEntry.js
@@ -258,10 +258,16 @@ var PlaceEntry = GObject.registerClass({
this._cancellable,
(places, error) => {
this._cancellable = null;
- this._updateResults(places);
- // cache results for later
- this._cache[this.text] = places;
+ if (error) {
+ this.place = null;
+ this._popover.showError();
+ } else {
+ this._updateResults(places);
+
+ // cache results for later
+ this._cache[this.text] = places;
+ }
// if search input has been updated, trigger a refresh
if (this.text !== this._previousSearch)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]