Release Lunaris 2.0.1 polish update

This commit is contained in:
2026-05-26 18:47:07 +03:00
parent f65efe7cf7
commit af62ddf0da
37 changed files with 2607 additions and 143 deletions
+13 -2
View File
@@ -24,8 +24,19 @@ enum MediaQualityMode {
class MediaUrlSelector {
const MediaUrlSelector._();
static List<String> feed(Post post) {
return _compact([post.previewUrl, post.sampleUrl]);
static List<String> feed(
Post post, {
MediaQualityMode mode = MediaQualityMode.auto,
bool mobile = false,
}) {
return switch (mode) {
MediaQualityMode.dataSaver => _compact([post.previewUrl, post.sampleUrl]),
MediaQualityMode.highQuality =>
_compact([post.sampleUrl, post.previewUrl]),
MediaQualityMode.auto => mobile
? _compact([post.previewUrl, post.sampleUrl])
: _compact([post.sampleUrl, post.previewUrl]),
};
}
static List<String> preview(Post post) {