@ -119,16 +119,16 @@ class GamesFragment : Fragment() {
applyGridGamesBinding ( )
applyGridGamesBinding ( )
binding . swipeRefresh . apply {
binding . swipeRefresh . apply {
( binding . swipeRefresh as ? MidScreen SwipeRefreshLayout) ?. setOnRefreshListener {
( binding . swipeRefresh as ? SwipeRefreshLayout ) ?. setOnRefreshListener {
gamesViewModel . reloadGames ( false )
gamesViewModel . reloadGames ( false )
}
}
( binding . swipeRefresh as ? MidScreen SwipeRefreshLayout) ?. setProgressBackgroundColorSchemeColor (
( binding . swipeRefresh as ? SwipeRefreshLayout ) ?. setProgressBackgroundColorSchemeColor (
com . google . android . material . color . MaterialColors . getColor (
com . google . android . material . color . MaterialColors . getColor (
binding . swipeRefresh ,
binding . swipeRefresh ,
com . google . android . material . R . attr . colorPrimary
com . google . android . material . R . attr . colorPrimary
)
)
)
)
( binding . swipeRefresh as ? MidScreen SwipeRefreshLayout) ?. setColorSchemeColors (
( binding . swipeRefresh as ? SwipeRefreshLayout ) ?. setColorSchemeColors (
com . google . android . material . color . MaterialColors . getColor (
com . google . android . material . color . MaterialColors . getColor (
binding . swipeRefresh ,
binding . swipeRefresh ,
com . google . android . material . R . attr . colorOnPrimary
com . google . android . material . R . attr . colorOnPrimary
@ -138,12 +138,12 @@ class GamesFragment : Fragment() {
if ( _binding == null ) {
if ( _binding == null ) {
return @post
return @post
}
}
( binding . swipeRefresh as ? MidScreen SwipeRefreshLayout) ?. isRefreshing = gamesViewModel . isReloading . value
( binding . swipeRefresh as ? SwipeRefreshLayout ) ?. isRefreshing = gamesViewModel . isReloading . value
}
}
}
}
gamesViewModel . isReloading . collect ( viewLifecycleOwner ) {
gamesViewModel . isReloading . collect ( viewLifecycleOwner ) {
( binding . swipeRefresh as ? MidScreen SwipeRefreshLayout) ?. isRefreshing = it
( binding . swipeRefresh as ? SwipeRefreshLayout ) ?. isRefreshing = it
binding . noticeText . setVisible (
binding . noticeText . setVisible (
visible = gamesViewModel . games . value . isEmpty ( ) && ! it ,
visible = gamesViewModel . games . value . isEmpty ( ) && ! it ,
gone = false
gone = false
@ -415,7 +415,7 @@ class GamesFragment : Fragment() {
val spacingNavigation = resources . getDimensionPixelSize ( R . dimen . spacing_navigation )
val spacingNavigation = resources . getDimensionPixelSize ( R . dimen . spacing_navigation )
resources . getDimensionPixelSize ( R . dimen . spacing_navigation_rail )
resources . getDimensionPixelSize ( R . dimen . spacing_navigation_rail )
( binding . swipeRefresh as ? MidScreen SwipeRefreshLayout) ?. setProgressViewEndTarget (
( binding . swipeRefresh as ? SwipeRefreshLayout ) ?. setProgressViewEndTarget (
false ,
false ,
barInsets . top + resources . getDimensionPixelSize ( R . dimen . spacing_refresh_end )
barInsets . top + resources . getDimensionPixelSize ( R . dimen . spacing_refresh_end )
)
)