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