Fix: Fix RPCPreview causing page to crash on iOS
Error: Text strings must be rendered within a <Text> component.
This commit is contained in:
parent
647a651102
commit
908c5bc2b0
1 changed files with 8 additions and 8 deletions
|
|
@ -176,6 +176,7 @@ export default function RPCPreview() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const progressData = getCurrentProgressData();
|
const progressData = getCurrentProgressData();
|
||||||
|
const previewText = getPreviewText();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RN.View style={styles.previewContainer}>
|
<RN.View style={styles.previewContainer}>
|
||||||
|
|
@ -208,10 +209,9 @@ export default function RPCPreview() {
|
||||||
<RN.Text style={styles.artistName} numberOfLines={1}>
|
<RN.Text style={styles.artistName} numberOfLines={1}>
|
||||||
{previewTrack.artist}
|
{previewTrack.artist}
|
||||||
</RN.Text>
|
</RN.Text>
|
||||||
{getStorage("showLargeText") &&
|
{getStorage("showLargeText") && previewText !== "No tooltip text" && (
|
||||||
getPreviewText() !== "No tooltip text" && (
|
|
||||||
<RN.Text style={styles.tooltipText} numberOfLines={1}>
|
<RN.Text style={styles.tooltipText} numberOfLines={1}>
|
||||||
{getPreviewText()}
|
{previewText}
|
||||||
</RN.Text>
|
</RN.Text>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -239,7 +239,7 @@ export default function RPCPreview() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = {
|
const styles = RN.StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
backgroundColor: "#1e1f22",
|
backgroundColor: "#1e1f22",
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
|
|
@ -377,4 +377,4 @@ const styles = {
|
||||||
minWidth: 35,
|
minWidth: 35,
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
},
|
},
|
||||||
} as const;
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue