Remove extra spacing after event time when weather disabled.

This commit is contained in:
azuo 2021-09-03 20:40:44 +08:00
parent ea0be72478
commit 43f085b13c
4 changed files with 10 additions and 10 deletions

View File

@ -53,7 +53,7 @@ object IntentHelper {
mapIntent
} else {
val map = "https://www.google.com/maps/search/?api=1&query=${Uri.encode(address)}"
val i = Intent(Intent.ACTION_VIEW, Uri.parse(map));
val i = Intent(Intent.ACTION_VIEW, Uri.parse(map))
i
}
}

View File

@ -71,7 +71,7 @@ object WidgetHelper {
}
override fun onTypefaceRequestFailed(reason: Int) {
handlerThread.quit();
handlerThread.quit()
function.invoke(null)
}
}

View File

@ -96,7 +96,7 @@ class AlignedWidget(val context: Context, val rightAligned: Boolean = false) {
// Weather
if (Preferences.showWeather && Preferences.weatherIcon != "") {
views.setViewVisibility(R.id.weather_rect, View.VISIBLE)
views.setViewVisibility(R.id.weather_sub_line, View.GONE)
views.setViewVisibility(R.id.weather_sub_line_rect, View.GONE)
val i = Intent(context, WidgetClickListenerReceiver::class.java)
i.action = Actions.ACTION_OPEN_WEATHER_INTENT
@ -116,7 +116,7 @@ class AlignedWidget(val context: Context, val rightAligned: Boolean = false) {
)
} else {
views.setViewVisibility(R.id.weather_rect, View.GONE)
views.setViewVisibility(R.id.weather_sub_line, View.GONE)
views.setViewVisibility(R.id.weather_sub_line_rect, View.GONE)
}
@ -233,7 +233,7 @@ class AlignedWidget(val context: Context, val rightAligned: Boolean = false) {
views.setViewVisibility(R.id.calendar_layout_rect, View.VISIBLE)
views.setViewVisibility(R.id.sub_line_rect, View.VISIBLE)
views.setViewVisibility(R.id.weather_sub_line_rect, View.VISIBLE)
views.setViewVisibility(R.id.weather_sub_line_rect, if (Preferences.showWeather && Preferences.weatherIcon != "") View.VISIBLE else View.GONE)
views.setViewVisibility(R.id.first_line_rect, View.GONE)
views.setViewVisibility(R.id.sub_line_top_margin_small_sans, View.GONE)
@ -575,7 +575,7 @@ class AlignedWidget(val context: Context, val rightAligned: Boolean = false) {
bindingView.dateLayout.isVisible = false
bindingView.calendarLayout.isVisible = true
bindingView.subLine.isVisible = true
bindingView.weatherSubLine.isVisible = true
bindingView.weatherSubLine.isVisible = Preferences.showWeather && Preferences.weatherIcon != ""
bindingView.subLineTopMarginSmall.visibility = View.GONE
bindingView.subLineTopMarginMedium.visibility = View.GONE

View File

@ -99,7 +99,7 @@ class StandardWidget(val context: Context) {
// Weather
if (Preferences.showWeather && Preferences.weatherIcon != "") {
views.setViewVisibility(R.id.weather_rect, View.VISIBLE)
views.setViewVisibility(R.id.weather_sub_line, View.GONE)
views.setViewVisibility(R.id.weather_sub_line_rect, View.GONE)
val i = Intent(context, WidgetClickListenerReceiver::class.java)
i.action = Actions.ACTION_OPEN_WEATHER_INTENT
@ -119,7 +119,7 @@ class StandardWidget(val context: Context) {
)
} else {
views.setViewVisibility(R.id.weather_rect, View.GONE)
views.setViewVisibility(R.id.weather_sub_line, View.GONE)
views.setViewVisibility(R.id.weather_sub_line_rect, View.GONE)
}
@ -263,7 +263,7 @@ class StandardWidget(val context: Context) {
)
views.setViewVisibility(R.id.calendar_layout_rect, View.VISIBLE)
views.setViewVisibility(R.id.sub_line_rect, View.VISIBLE)
views.setViewVisibility(R.id.weather_sub_line_rect, View.VISIBLE)
views.setViewVisibility(R.id.weather_sub_line_rect, if (Preferences.showWeather && Preferences.weatherIcon != "") View.VISIBLE else View.GONE)
views.setViewVisibility(R.id.first_line_rect, View.GONE)
@ -604,7 +604,7 @@ class StandardWidget(val context: Context) {
bindingView.dateLayout.isVisible = false
bindingView.calendarLayout.isVisible = true
bindingView.subLine.isVisible = true
bindingView.weatherSubLine.isVisible = true
bindingView.weatherSubLine.isVisible = Preferences.showWeather && Preferences.weatherIcon != ""
bindingView.subLineTopMarginSmall.visibility =
if (Preferences.secondRowTopMargin == Constants.SecondRowTopMargin.SMALL.rawValue) View.VISIBLE else View.GONE