mirror of
https://github.com/Livinglist/Hacki.git
synced 2025-08-06 18:24:42 +08:00

* replaced StoryScreen with ItemScreen. * use ItemScreen for share extension. * fixed getItemId() * bumped version. * force new screen on viewing comments in separate thread. * disable comment thread if comment is deleted or dead. * navigate to new screen on viewing parent thread. * bumped version. * fixed inconsistent fontsize. * bumped version.
16 lines
494 B
Dart
16 lines
494 B
Dart
extension StringExtension on String {
|
|
int? getItemId() {
|
|
final RegExp regex = RegExp(r'\d+$');
|
|
final RegExp exception = RegExp(r'\)|].*$');
|
|
final String match = regex.stringMatch(replaceAll(exception, '')) ?? '';
|
|
return int.tryParse(match);
|
|
}
|
|
|
|
String removeAllEmojis() {
|
|
final RegExp regex = RegExp(
|
|
r'(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])',
|
|
);
|
|
return replaceAllMapped(regex, (_) => '');
|
|
}
|
|
}
|