TrixiEther / DashchanFork

Imageboards client for Android
GNU General Public License v3.0
53 stars 2 forks source link

Filerename feature bugs #124

Closed TrixiEther closed 1 year ago

TrixiEther commented 1 year ago
  1. Fixed #116
  2. Fixed #123 - based on Windows OS specific prohibited characters
  3. Added a check for a filename size limit of 255 characters, because the previous implementation did not work
N3-M3-S1S commented 1 year ago

@TrixiEther As for now, if a user types a blocked character - all filename gets deleted. I don't know if this is a bug or a feature, but it may not be a good user experience. I'd like to suggest different implementation of the filter. Should i do it here or crate a new PR?

TrixiEther commented 1 year ago

@N3-M3-S1S it's weird because i just tested it. If the user enters a character, then it is simply not entered, the file name is not erased from me Test environment: Android 11.0 Pixel 2 API 30

N3-M3-S1S commented 1 year ago

@TrixiEther Here's how it looks like on Nexus 5 Android 11. Seems like it doesn't reset if you try to insert a forbidden character into the original filename though.

filename_reset.webm

N3-M3-S1S commented 1 year ago

@TrixiEther Also, in media preferences you can enter forbidden symbols in "New filename" field.

TrixiEther commented 1 year ago

@N3-M3-S1S interesting, I'll check it out when I get a chance

TrixiEther commented 1 year ago

Updated changes. The functionality of EditPreference has been slightly extended with the ability to add custom filters for editText. Simplified filter by filename length by adding LenghtFilter. Constants moved to utility class for ease of use