@@ -486,53 +486,46 @@ private struct GenericList: View, StoreAccessor {
486486 self . moreLoadFailedFlag = moreLoadFailedFlag
487487 self . fetchAction = fetchAction
488488 self . loadMoreAction = loadMoreAction
489-
490- UIScrollView . appearance ( ) . keyboardDismissMode = . onDrag
491489 }
492490
493491 var body : some View {
494- KRefreshScrollView (
495- progressTint: . gray,
496- arrowTint: . primary,
497- onUpdate: onUpdate
498- ) {
499- if isTokenMatched {
500- SearchBar (
501- keyword: homeInfoBinding. searchKeyword,
502- isTextFieldFocused: _isTextFieldFocused,
503- commitAction: searchBarCommit,
504- filterAction: searchBarFilter
505- )
506- . padding ( . horizontal)
507- . padding ( . bottom, 10 )
508- }
509- if !didLogin && isTokenMatched {
510- NotLoginView ( loginAction: toggleSetting)
511- . padding ( . top, 30 )
512- } else if loadingFlag {
513- LoadingView ( )
514- . padding ( . top, 30 )
515- } else if loadFailedFlag {
516- NetworkErrorView ( retryAction: fetchAction)
517- . padding ( . top, 30 )
518- } else if notFoundFlag {
519- NotFoundView ( retryAction: fetchAction)
520- . padding ( . top, 30 )
521- } else {
492+ if !didLogin && isTokenMatched {
493+ NotLoginView ( loginAction: toggleSetting)
494+ } else if loadingFlag {
495+ LoadingView ( )
496+ } else if loadFailedFlag {
497+ NetworkErrorView ( retryAction: fetchAction)
498+ } else if notFoundFlag {
499+ NotFoundView ( retryAction: fetchAction)
500+ } else {
501+ List {
502+ if isTokenMatched {
503+ SearchBar (
504+ keyword: homeInfoBinding. searchKeyword,
505+ isTextFieldFocused: _isTextFieldFocused,
506+ commitAction: searchBarCommit,
507+ filterAction: searchBarFilter
508+ )
509+ . listRowBackground ( Color . clear)
510+ . listRowSeparator ( . hidden)
511+ . padding ( . bottom, 10 )
512+ }
522513 ForEach ( items ?? [ ] ) { item in
523- NavigationLink ( destination: DetailView ( gid: item. id, depth: 0 ) ) {
514+ ZStack {
515+ NavigationLink (
516+ destination: DetailView (
517+ gid: item. id, depth: 0
518+ )
519+ ) { }
524520 MangaSummaryRow ( manga: item)
525- . onAppear {
526- onRowAppear ( item)
527- }
521+ }
522+ . listRowBackground ( Color . clear)
523+ . listRowSeparator ( . hidden)
524+ . onAppear {
525+ onRowAppear ( item)
528526 }
529527 }
530- . padding ( . horizontal)
531- . transition (
532- AnyTransition
533- . opacity
534- . animation ( . default)
535- )
528+ . transition ( animatedTransition)
536529 HStack ( alignment: . center) {
537530 Spacer ( )
538531 ProgressView ( )
@@ -543,8 +536,13 @@ private struct GenericList: View, StoreAccessor {
543536 . opacity ( moreLoadFailedFlag ? 1 : 0 )
544537 Spacer ( )
545538 }
539+ . listRowBackground ( Color . clear)
540+ . listRowSeparator ( . hidden)
546541 . frame ( height: 30 )
547542 }
543+ . transition ( animatedTransition)
544+ . refreshable ( action: onUpdate)
545+ . listStyle ( . plain)
548546 }
549547 }
550548}
0 commit comments