fix: thumbnail image url

Closes #360

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-02 11:47:06 +08:00
parent a605c0fcfb
commit c32b98fa7f
5 changed files with 37 additions and 27 deletions

View File

@@ -52,8 +52,11 @@ extension ListExt<T> on List<T>? {
bool ne(List<T>? other) => !eq(other);
}
extension StringExt on String {
String get http2https => replaceFirst(RegExp("^http://"), "https://");
final _regExp = RegExp("^(http:)?//", caseSensitive: false);
extension StringExt on String? {
String get http2https =>
this == null ? '' : this!.replaceFirst(_regExp, "https://");
}
extension StringNullExt on String? {