Better documentation

This commit is contained in:
LisoUseInAIKyrios 2024-03-27 18:55:34 +04:00
parent 88ccb9f58f
commit 3baaa1344a
2 changed files with 10 additions and 7 deletions

View File

@ -14,9 +14,9 @@ import java.util.Objects;
import app.revanced.integrations.shared.Logger;
/**
* If using with {@link ListPreference}, the entries must be the same name as the
* enum values but any casing can be used. So <code>EnumClass.WHATEVER</code>
* can be displayed in the UI as as 'Whatever'.
* If an Enum value is removed or changed, any saved or imported data using the
* non existent value will be reverted to the default value
* (the event is logged, but no user error is displayed).
*
* All JSON text is also converted to lowercase to keep the output less obnoxious.
*/

View File

@ -104,10 +104,13 @@ public final class AlternativeThumbnailsPatch {
MIDDLE(2),
END(3);
private final int urlSuffix;
/**
* The url image number. Such as the 2 in 'hq720_2.jpg'
*/
private final int altImageNumber;
ThumbnailStillTime(int urlSuffix) {
this.urlSuffix = urlSuffix;
ThumbnailStillTime(int altImageNumber) {
this.altImageNumber = altImageNumber;
}
}
@ -455,7 +458,7 @@ public final class AlternativeThumbnailsPatch {
}
String getAltImageNameToUse() {
return altImageName + Settings.ALT_THUMBNAIL_STILLS_TIME.get().urlSuffix;
return altImageName + Settings.ALT_THUMBNAIL_STILLS_TIME.get().altImageNumber;
}
}