sharing: Fix master switch

Since the switches for media, personal file, and screen sharing are in the header bar of the
respective dialogs, they are not visible when we click on the master switch. This caused the
check in OFF_IF_VISIBLE to always fail.

Fix it by checking if the corresponding button in the main list box is visible, instead.

Closes: #240
11 jobs for fix-sharing-master-switch in 3 minutes and 45 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #128921
build

00:02:11

 
  Test
passed #128923
asan

00:01:33

passed #128922
test

00:01:17

 
  Manual
manual #128928
allowed to fail manual
armv8
manual #128924
allowed to fail manual
flatpak
manual #128927
allowed to fail manual
msan
manual #128929
allowed to fail manual
ppc64le
manual #128925
allowed to fail manual
tsan
manual #128926
allowed to fail manual
ubsan
 
  Review
manual #128930
allowed to fail manual
review
manual #128931
allowed to fail manual
stop_review