ui: don't ignore offline devices when determining whether pairing is possible

This commit is contained in:
Peter F. Patel-Schneider 2020-01-12 12:23:43 -05:00 committed by Filipe Laíns
parent 0198d58dc7
commit d6fa5269c5
1 changed files with 2 additions and 2 deletions

View File

@ -593,8 +593,8 @@ def _update_receiver_panel(receiver, panel, buttons, full=False):
may_pair = receiver.may_unpair and not is_pairing
if may_pair and devices_count >= receiver.max_devices:
online_devices = tuple(n for n in range(1, receiver.max_devices) if n in receiver and receiver[n].online)
may_pair &= len(online_devices) < receiver.max_devices
paired_devices = tuple(n for n in range(1, receiver.max_devices+1) if n in receiver)
may_pair &= len(paired_devices) < receiver.max_devices
buttons._pair.set_sensitive(may_pair)
buttons._pair.set_visible(True)