Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Dec 25, 2024
1 parent 6359c5b commit 8dbd700
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ export function ListItem({
const hasAudio = entry.entries?.attachments?.[0].url
const hasMedia = entry.entries?.media?.[0]?.url

const marginWidth = 8 * (isMobile ? 1.125 : 1)
// calculate the max width to have a correct truncation
// FIXME: this is not easy to maintain, need to refactor
const feedIconWidth = 20 + 8 * (isMobile ? 1.125 : 1)
const audioCoverWidth = settingWideMode ? 65 : 80
const mediaWidth =
(settingWideMode ? 48 : 80) * (isMobile ? 1.125 : 1) + 8 * (isMobile ? 1.125 : 1)
const feedIconWidth = 20 + marginWidth
const audioCoverWidth = settingWideMode ? 65 : 80 + marginWidth
const mediaWidth = (settingWideMode ? 48 : 80) * (isMobile ? 1.125 : 1) + marginWidth

let savedWidth = 0
if (!withAudio) {
savedWidth += feedIconWidth
Expand Down

0 comments on commit 8dbd700

Please sign in to comment.