avoid updating invalid month fragments
This commit is contained in:
parent
5060d2b893
commit
6309d9c48b
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue