mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-10 05:45:32 +00:00
best-match: Allow both NULL and empty strings as phone number
This allows us to get rid of some special casing when retrieving primary and secondary display information.
This commit is contained in:
parent
bbf7e2353a
commit
1b8ec26185
1 changed files with 1 additions and 2 deletions
|
@ -365,12 +365,11 @@ calls_best_match_set_phone_number (CallsBestMatch *self,
|
||||||
g_autoptr (CallsPhoneNumberQuery) query = NULL;
|
g_autoptr (CallsPhoneNumberQuery) query = NULL;
|
||||||
|
|
||||||
g_return_if_fail (CALLS_IS_BEST_MATCH (self));
|
g_return_if_fail (CALLS_IS_BEST_MATCH (self));
|
||||||
g_return_if_fail (phone_number);
|
|
||||||
|
|
||||||
g_clear_pointer (&self->phone_number, g_free);
|
g_clear_pointer (&self->phone_number, g_free);
|
||||||
|
|
||||||
// Consider empty string phone numbers as NULL
|
// Consider empty string phone numbers as NULL
|
||||||
if (phone_number[0] != '\0')
|
if (!STR_IS_NULL_OR_EMPTY (phone_number))
|
||||||
self->phone_number = g_strdup (phone_number);
|
self->phone_number = g_strdup (phone_number);
|
||||||
|
|
||||||
if (self->view)
|
if (self->view)
|
||||||
|
|
Loading…
Reference in a new issue