badaix / snapdroid

Snapcast client for Android
GNU General Public License v3.0
135 stars 26 forks source link

changing Client's name has no effect #63

Closed franconianmetal closed 5 months ago

franconianmetal commented 5 months ago

running 0-28-0-snapserver (thanks for updating!!!) on proxmox-container. PRETTY_NAME="Ubuntu 22.04.4 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.4 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy additionall manual install of libflac12 (just information - find it here) wget http://ftp.de.debian.org/debian/pool/main/f/flac/libflac12_1.4.2+ds-2_amd64.deb

When changing client's name via "details" in web-Interface it works and is being reflected to any/android-client immediately When I change client's name via "details" in current 0.28.0-snapcast-android-client the new name is not adopted.

reverting to 0.27.0-android-client works as expected: names can be changed Android-verson=13 cleaned cache/reinstalled both version on android device -> seems to be an issue with 0.28.0-android-client

badaix commented 5 months ago

I cannot reproduce it, neither on my Pixel 4a (android 13), nor on my Pixel 7a (android 14).

There is actually one change that could potentially cause this issue. This change was done by Android Studio's Cleanup code feature: https://github.com/badaix/snapdroid/commit/0c12b3365ea723ad1f22165a24830aa628232d33#diff-13ae8a094d8cf4e78de818853187a8b7338b464ac825b53cfa98ae719281feb9R110

It checks for equality of the client settings before and after editing:

The old code line:

if (name != null ? !name.equals(that.name) : that.name != null) return false;

the new line:

if (!Objects.equals(name, that.name)) return false;

I'm by far not a Java expert, but the code looks valid and good to me.

badaix commented 5 months ago

I've reverted the commit 0c12b3365ea723ad1f22165a24830aa628232d33, please try the CI built: https://github.com/badaix/snapdroid/actions/runs/8774949825

franconianmetal commented 5 months ago

thx...checked, but branch does not fix the problem. Same behaviour as described

"develop_snapshot-87894bf1be4f3ae59fede72270c5991da5c15b8b"

badaix commented 5 months ago

Should be fixed now with 21c7389e61e0e9e10b6dac13fc8639798c891810, please try this CI build: https://github.com/badaix/snapdroid/actions/runs/8784143765

franconianmetal commented 5 months ago

thx, tested for name change and latency change. works as expected! Best Regards

badaix commented 5 months ago

Fixed in Snapdroid v0.28.0.1