Merge pull request #1630 from Aga-C/fix-new-event-date

Fixed new event date in month-day view (#1629)
This commit is contained in:
Tibor Kaputa 2022-02-09 11:17:42 +01:00 committed by GitHub
commit 69eeda5753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -37,5 +37,5 @@ class MyMonthDayPagerAdapter(fm: FragmentManager, private val mCodes: List<Strin
mFragments[pos].printCurrentView()
}
fun getNewEventDayCode(pos: Int): String = mFragments[pos].getNewEventDayCode()
fun getNewEventDayCode(pos: Int): String? = mFragments[pos].getNewEventDayCode()
}

View File

@ -175,7 +175,7 @@ class MonthDayFragment : Fragment(), MonthlyCalendar, RefreshRecyclerViewListene
fun printCurrentView() {}
fun getNewEventDayCode() = if (mSelectedDayCode.isEmpty()) mDayCode else mSelectedDayCode
fun getNewEventDayCode() = if (mSelectedDayCode.isEmpty()) null else mSelectedDayCode
private fun getMonthLabel(shownMonthDateTime: DateTime): String {
var month = Formatter.getMonthName(requireActivity(), shownMonthDateTime.monthOfYear)