add: blocked users page

This commit is contained in:
trisua 2025-05-09 22:36:16 -04:00
parent 6893aeedb5
commit 3706764437
18 changed files with 427 additions and 178 deletions

View file

@ -111,22 +111,21 @@ impl CustomEmoji {
let mut chars = input.chars();
while let Some(char) = chars.next() {
if char == '\\' && escape == false {
if char == '\\' && !escape {
escape = true;
continue;
} else if char == ':' && escape == false {
} else if char == ':' && !escape {
let mut community_id: String = String::new();
let mut accepting_community_id_chars: bool = true;
let mut emoji_name: String = String::new();
let mut char_count: u32 = 0; // if we're past the first 4 characters and we haven't hit a digit, stop accepting community id
while let Some(char) = chars.next() {
for (char_count, char) in (0_u32..).zip(chars.by_ref()) {
if (char == ':') | (char == ' ') {
in_emoji = false;
break;
}
if char.is_digit(10) && accepting_community_id_chars {
if char.is_ascii_digit() && accepting_community_id_chars {
community_id.push(char);
} else if char == '.' {
// the period closes the community id
@ -138,8 +137,6 @@ impl CustomEmoji {
if char_count >= 4 && community_id.is_empty() {
accepting_community_id_chars = false;
}
char_count += 1;
}
out.push((