[web] Fixed thread name clearing issue in ThreadSettingGeneralTab
Summary:
Fixed issue where the thread name cleared when setting it to anything with the same prefix. The bug was with the firstLine function in onChangeName.
firstLine in onChangeName was introduced in D863 and D862 to make it impossible to set a thread title with newlines, this fix still ensures that.
And for good measure, this also helps resolve the issue in D3980, where the ThreadSettingsGeneralTab button doesn't stay disabled if there are no queued changes.
Related Linear issue with full context here.
Test Plan:
Tested on Chrome/Safari and the issue is gone.
Before:
After:
Reviewers: atul
Reviewed By: atul
Subscribers: ashoat, palys-swm, Adrian
Differential Revision: https://phabricator.ashoat.com/D4062