avoid updating invalid month fragments

This commit is contained in:
tibbi 2016-10-17 22:11:33 +02:00
parent 5060d2b893
commit 6309d9c48b
2 changed files with 6 additions and 1 deletions

View File

@ -4,8 +4,10 @@ import android.content.Intent
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import com.simplemobiletools.calendar.*
import com.simplemobiletools.calendar.Constants
import com.simplemobiletools.calendar.Formatter
import com.simplemobiletools.calendar.NavigationListener
import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.adapters.MyMonthPagerAdapter
import com.simplemobiletools.calendar.adapters.MyYearPagerAdapter
import com.simplemobiletools.calendar.extensions.updateWidget

View File

@ -163,6 +163,9 @@ class MonthFragment : Fragment(), Calendar {
val displayWeekNumbers = mConfig.displayWeekNumbers
val len = days.size
if (week_num == null)
return
week_num.setTextColor(mWeakTextColor)
week_num.visibility = if (displayWeekNumbers) View.VISIBLE else View.GONE