ui: only update remaining pairings after sucessful pairing
This commit is contained in:
parent
9e5eb5853e
commit
d6847a6ce4
|
@ -81,6 +81,7 @@ def _check_lock_state(assistant, receiver, count=2):
|
|||
return False
|
||||
|
||||
if receiver.status.new_device:
|
||||
receiver.remaining_pairings(False) # Update remaining pairings
|
||||
device, receiver.status.new_device = receiver.status.new_device, None
|
||||
_pairing_succeeded(assistant, receiver, device)
|
||||
return False
|
||||
|
|
|
@ -630,7 +630,7 @@ def _update_receiver_panel(receiver, panel, buttons, full=False):
|
|||
}
|
||||
elif devices_count > 0:
|
||||
paired_text += '\n\n<small>%s</small>' % _('Only one device can be paired to this receiver.')
|
||||
pairings = receiver.remaining_pairings(False)
|
||||
pairings = receiver.remaining_pairings()
|
||||
if (pairings is not None and pairings >= 0):
|
||||
paired_text += '\n<small>%s</small>' % (
|
||||
ngettext('This receiver has %d pairing remaining.', 'This receiver has %d pairings remaining.', pairings) %
|
||||
|
|
Loading…
Reference in New Issue