ウィジェットのバグを修正
This commit is contained in:
parent
0dad51cda2
commit
58dcc27704
@ -81,17 +81,15 @@ export function InfoWidget({ time, text }) {
|
||||
}}
|
||||
>
|
||||
{text ? (
|
||||
<FlexWidget
|
||||
<TextWidget
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
width: "match_parent",
|
||||
backgroundColor: "#ffffff",
|
||||
flex: 1,
|
||||
color: "#000000",
|
||||
|
||||
fontSize: 20,
|
||||
}}
|
||||
clickAction="WIDGET_CLICK"
|
||||
>
|
||||
<FlexText flex={3} text={text} />
|
||||
</FlexWidget>
|
||||
clickAction="OPEN_APP"
|
||||
text={text}
|
||||
/>
|
||||
) : (
|
||||
<TextWidget
|
||||
style={{
|
||||
|
@ -33,7 +33,9 @@ export async function widgetTaskHandler(props) {
|
||||
switch (WidgetName) {
|
||||
case "Info_Widget": {
|
||||
const { time, text } = await getInfoString();
|
||||
renderWidget(<InfoWidget time={time} text={text} />);
|
||||
renderWidget(
|
||||
<InfoWidget time={time} text={text && text.toString()} />
|
||||
);
|
||||
break;
|
||||
}
|
||||
case "JR_shikoku_train_info":
|
||||
|
@ -34,7 +34,7 @@ export const WidgetSettings = ({ navigate }) => {
|
||||
});
|
||||
getInfoString().then(({ time, text }) => {
|
||||
setTime(time);
|
||||
setTrainInfo(text);
|
||||
setTrainInfo(text.toString());
|
||||
});
|
||||
}, []);
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user