Skip to content

Commit 0325fe2

Browse files
authored
Hide last updated datetime from widget when in empty state (#3416)
<!-- Thank you for submitting a Pull Request and helping to improve Home Assistant. Please complete the following sections to help the processing and review of your changes. Please do not delete anything from this template. --> ## Summary <!-- Provide a brief summary of the changes you have made and most importantly what they aim to achieve --> ## Screenshots <!-- If this is a user-facing change not in the frontend, please include screenshots in light and dark mode. --> ## Link to pull request in Documentation repository <!-- Pull requests that add, change or remove functionality must have a corresponding pull request in the Companion App Documentation repository (https://github.com/home-assistant/companion.home-assistant). Please add the number of this pull request after the "#" --> Documentation: home-assistant/companion.home-assistant# ## Any other notes <!-- If there is any other information of note, like if this Pull Request is part of a bigger change, please include it here. -->
1 parent 9034e38 commit 0325fe2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Extensions/Widgets/Common/WidgetBasicContainerView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct WidgetBasicContainerView: View {
3030
} else {
3131
content(for: contents)
3232
}
33-
if showLastUpdate {
33+
if showLastUpdate, !contents.isEmpty {
3434
Group {
3535
Text("\(L10n.Widgets.Custom.ShowUpdateTime.title) ") + Text(Date.now, style: .time)
3636
}

0 commit comments

Comments
 (0)