refactor(PostCard, ImageGrid, SmartImage): enhance post editing display and image handling
- Introduced a new method to determine the last edited time for posts, prioritizing content_edited_at for better accuracy in display. - Updated PostCard and PostDetailScreen components to utilize the new editing display logic. - Enhanced ImageGrid and SmartImage components to support additional preview URLs and improve image loading behavior, including lazy loading optimizations for web. - Modified Post and PostDTO interfaces to include contentEditedAt for better tracking of post edits.
This commit is contained in:
@@ -81,7 +81,9 @@ export interface Post {
|
||||
createdAt: string;
|
||||
/** 更新时间 */
|
||||
updatedAt: string;
|
||||
|
||||
/** 用户编辑内容的时间(与统计类更新解耦) */
|
||||
contentEditedAt?: string;
|
||||
|
||||
// ==================== 向后兼容字段 (snake_case) ====================
|
||||
// 这些字段用于与旧代码兼容,新代码应使用 camelCase 版本
|
||||
|
||||
@@ -107,6 +109,8 @@ export interface Post {
|
||||
created_at?: string;
|
||||
/** @deprecated 请使用 updatedAt */
|
||||
updated_at?: string;
|
||||
/** @deprecated 请使用 contentEditedAt */
|
||||
content_edited_at?: string;
|
||||
/** @deprecated 请使用 communityId */
|
||||
community_id?: string;
|
||||
/** @deprecated 请使用 status */
|
||||
|
||||
Reference in New Issue
Block a user