From 16e7cfdda446da84d1f9d2e16414fcffd27a2c01 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Sun, 8 Oct 2023 10:03:26 +0000 Subject: [PATCH] Fix authur name filter not works for app api --- src/data/data.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/data/data.rs b/src/data/data.rs index 8ce8bf1..b8845b5 100644 --- a/src/data/data.rs +++ b/src/data/data.rs @@ -60,7 +60,12 @@ impl PixivData { /// Read data from [PixivAppIllust]. pub fn from_app_illust(&mut self, illust: &PixivAppIllust) { self.title = illust.title().map(|s| s.to_owned()); - self.author = illust.user_name().map(|s| s.to_owned()); + self.author = illust + .user_name() + .map(|s| match get_helper().author_name_filters() { + Some(l) => l.filter(s), + None => s.to_owned(), + }); self.description = illust.caption().map(|s| s.to_owned()); let mut tags = Vec::new(); for i in illust.tags() {