mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-27 21:00:17 +08:00
* opt: danmaku weight
* opt: cache clean
* opt: level img
* opt: play icon
* opt: svg big-vip
* opt: webview ua
* opt: simple dialog
* feat: export vtt
* tweak
* opt: mapIndexed
* feat: more subtitle
* refa: settings page
* feat: codec list options
* drawPath
Signed-off-by: dom <githubaccount56556@proton.me>
* custom dialog option
Signed-off-by: dom <githubaccount56556@proton.me>
* update
Signed-off-by: dom <githubaccount56556@proton.me>
* Revert "drawPath"
This reverts commit e8a4b19f0f.
* opt: _initStreamIndex
* fix: avoid gap
* fix: scale [skip ci]
* fix: hide repost menu not login
* tweaks
Signed-off-by: dom <githubaccount56556@proton.me>
---------
Co-authored-by: dom <githubaccount56556@proton.me>
36 lines
867 B
Dart
36 lines
867 B
Dart
import 'package:PiliPlus/common/widgets/svg/level_icon.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
abstract final class BiliUtils {
|
|
static bool isDefaultFav(int? attr) {
|
|
if (attr == null) {
|
|
return false;
|
|
}
|
|
return (attr & 2) == 0;
|
|
}
|
|
|
|
static String isPublicFavText(int? attr) {
|
|
if (attr == null) {
|
|
return '';
|
|
}
|
|
return isPublicFav(attr) ? '公开' : '私密';
|
|
}
|
|
|
|
static bool isPublicFav(int attr) {
|
|
return (attr & 1) == 0;
|
|
}
|
|
|
|
static bool isCustomFollowTag(int? tagid) {
|
|
return tagid != null && tagid != 0 && tagid != -10 && tagid != -2;
|
|
}
|
|
|
|
// https://s1.hdslb.com/bfs/svg-next/font/2025-10-27/freshspace-zpjpp3aqht.css
|
|
static Widget levelPicture(
|
|
int level, {
|
|
bool isSeniorMember = false,
|
|
double height = 11,
|
|
}) {
|
|
return UserLevel(level, height: height, flash: isSeniorMember);
|
|
}
|
|
}
|