fix: reschedule via delete+recreate, sort posts chrono, show account name
- Reschedule: Postiz public API v1 has no PUT/PATCH on posts; implement as delete + recreate with updated date and same content/integrations - Posts list: sort ascending by publishDate so nearest post appears first - PostCard footer: show integration name (or identifier) before the timestamp, truncated to 2 accounts with +N overflow Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -139,6 +139,19 @@ export function PostCard({ post, onDelete, onLongPress }: PostCardProps) {
|
||||
{truncatedContent}
|
||||
</Text>
|
||||
<View style={styles.footer}>
|
||||
{integrations.length > 0 && (
|
||||
<>
|
||||
<Text style={[styles.accountName, { color: colors.mutedForeground }]} numberOfLines={1}>
|
||||
{integrations
|
||||
.slice(0, 2)
|
||||
.map((i) => i.name || i.identifier || "")
|
||||
.filter(Boolean)
|
||||
.join(", ")}
|
||||
{integrations.length > 2 ? ` +${integrations.length - 2}` : ""}
|
||||
</Text>
|
||||
<Text style={[styles.dot, { color: colors.mutedForeground }]}>·</Text>
|
||||
</>
|
||||
)}
|
||||
<Feather name="clock" size={12} color={colors.mutedForeground} />
|
||||
<Text style={[styles.date, { color: colors.mutedForeground }]}>
|
||||
{formatDate(post.publishDate)}
|
||||
@@ -191,6 +204,15 @@ const styles = StyleSheet.create({
|
||||
fontSize: 12,
|
||||
fontFamily: "Inter_400Regular",
|
||||
},
|
||||
accountName: {
|
||||
fontSize: 12,
|
||||
fontFamily: "Inter_400Regular",
|
||||
flexShrink: 1,
|
||||
},
|
||||
dot: {
|
||||
fontSize: 12,
|
||||
marginHorizontal: 3,
|
||||
},
|
||||
deleteAction: {
|
||||
width: 72,
|
||||
alignItems: "center",
|
||||
|
||||
Reference in New Issue
Block a user