Blocking Avatar Display for Blocked Users in Forkgram
Preface
Some people's avatars are 18+ or those flashing GIFs that hurt your eyes.
So we need to block the display of avatars.
Agent-Oriented Development 1
Herems integrating with mimo-v2.5-pro
The content in the blockquote below is the natural language I sent to the Agent
在 https://github.com/crazypeace/forkgram-tdesktop 基于 dev 新开一个 branch
ban-avatar-pic
新建一个yml文件, 基于这个branch编译
分析代码 显示 avatar 图片的场景.
包括但不限于:
在群消息中显示,
在profile窗口显示,
在profile窗口点了avatar图片后全屏显示
讨论, 如果我希望某个用户的avatar图片显示时, 就和没有设置avatar图片一样的处理逻辑. 最高效的修改方式是怎样的?
Agent feedback:
采用 方案 A:在 PeerData 层拦截,
判断方式为该用户是否被blocked.
* I'll just use the blocked user list to demonstrate the basic functionality.
Effect
The avatar is still displayed in group messages, and the avatar is also displayed when opening the profile window.
However, clicking the avatar in the profile window no longer opens the fullscreen view.
Agent-Oriented Development 2
Described the test results to the Agent.
The Agent analyzed again and said there's another function that needs to be changed.
Effect
As soon as I opened the group link and saw the group messages, the avatars that should be blocked were visible.
But after clicking the avatar in the group message and opening the profile window, the avatar was displayed as if not set, and the avatar in the group message was also no longer displayed.
Agent-Oriented Development 3
Described the test results to the Agent.
The Agent analyzed again and said that the user's blocked status is loaded slowly.
I tried a different method to verify.
First, open Settings - Privacy and Security - Blocked users
After the blocked user list is loaded.
Then open the group link, and you can see that the avatars in the group messages are blocked as expected.
* Well. This is just to demonstrate the basic functionality, I've decided to stop at this point.
Demo Effect
Github
========