mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-26 13:15:31 +00:00
best-match: Don't special case NULL best match
We always get a valid best match, even for NULL or empty ids, so there is no more need to special case it.
This commit is contained in:
parent
a478be1795
commit
2587d7d738
1 changed files with 0 additions and 8 deletions
|
@ -475,9 +475,6 @@ calls_best_match_get_primary_info (CallsBestMatch *self)
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
if (!self)
|
|
||||||
goto anon;
|
|
||||||
|
|
||||||
g_return_val_if_fail (CALLS_IS_BEST_MATCH (self), NULL);
|
g_return_val_if_fail (CALLS_IS_BEST_MATCH (self), NULL);
|
||||||
|
|
||||||
name = calls_best_match_get_name (self);
|
name = calls_best_match_get_name (self);
|
||||||
|
@ -487,7 +484,6 @@ calls_best_match_get_primary_info (CallsBestMatch *self)
|
||||||
if (self->phone_number)
|
if (self->phone_number)
|
||||||
return self->phone_number;
|
return self->phone_number;
|
||||||
|
|
||||||
anon:
|
|
||||||
return _("Anonymous caller");
|
return _("Anonymous caller");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,9 +497,6 @@ anon:
|
||||||
const char *
|
const char *
|
||||||
calls_best_match_get_secondary_info (CallsBestMatch *self)
|
calls_best_match_get_secondary_info (CallsBestMatch *self)
|
||||||
{
|
{
|
||||||
if (!self)
|
|
||||||
goto anon;
|
|
||||||
|
|
||||||
g_return_val_if_fail (CALLS_IS_BEST_MATCH (self), NULL);
|
g_return_val_if_fail (CALLS_IS_BEST_MATCH (self), NULL);
|
||||||
|
|
||||||
if (self->matched_individual)
|
if (self->matched_individual)
|
||||||
|
@ -516,6 +509,5 @@ calls_best_match_get_secondary_info (CallsBestMatch *self)
|
||||||
* https://gitlab.gnome.org/GNOME/calls/-/issues/358
|
* https://gitlab.gnome.org/GNOME/calls/-/issues/358
|
||||||
*/
|
*/
|
||||||
|
|
||||||
anon:
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue