@@ -84,47 +84,48 @@ const NovelThumbnail = ({
8484} : NovelThumbnailProps ) => {
8585 const [ expanded , setExpanded ] = useState ( false ) ;
8686
87- if ( ! expanded ) {
88- return (
89- < TouchableWithoutFeedback onPress = { ( ) => setExpanded ( ! expanded ) } >
87+ return (
88+ < TouchableWithoutFeedback
89+ onPress = { ( ) => setExpanded ( ! expanded ) }
90+ style = { styles . novelThumbnailContainer }
91+ >
92+ { ! expanded ? (
9093 < Image source = { source } style = { styles . novelThumbnail } />
91- </ TouchableWithoutFeedback >
92- ) ;
93- } else {
94- return (
95- < Portal >
96- < IconButton
97- icon = "pencil-outline"
98- style = { {
99- position : 'absolute' ,
100- top : StatusBar . currentHeight ?? 0 + 10 ,
101- right : 10 ,
102- zIndex : 10 ,
103- } }
104- iconColor = { theme . onBackground }
105- onPress = { setCustomNovelCover }
106- />
107- < Pressable
108- style = { {
109- position : 'absolute' ,
110- width : Dimensions . get ( 'window' ) . width ,
111- height : Dimensions . get ( 'window' ) . height + 60 ,
112- justifyContent : 'center' ,
113- backgroundColor : 'rgba(0,0,0,0.7)' ,
114- } }
115- onPress = { ( ) => setExpanded ( false ) }
116- >
117- < Image
118- source = { source }
94+ ) : (
95+ < Portal >
96+ < IconButton
97+ icon = "pencil-outline"
11998 style = { {
120- width : Dimensions . get ( 'window' ) . width ,
121- height : ( Dimensions . get ( 'window' ) . width * 3 ) / 2 ,
99+ position : 'absolute' ,
100+ top : StatusBar . currentHeight ?? 0 + 10 ,
101+ right : 10 ,
102+ zIndex : 10 ,
122103 } }
104+ iconColor = { theme . onBackground }
105+ onPress = { setCustomNovelCover }
123106 />
124- </ Pressable >
125- </ Portal >
126- ) ;
127- }
107+ < Pressable
108+ style = { {
109+ position : 'absolute' ,
110+ width : Dimensions . get ( 'window' ) . width ,
111+ height : Dimensions . get ( 'window' ) . height + 60 ,
112+ justifyContent : 'center' ,
113+ backgroundColor : 'rgba(0,0,0,0.7)' ,
114+ } }
115+ onPress = { ( ) => setExpanded ( false ) }
116+ >
117+ < Image
118+ source = { source }
119+ style = { {
120+ width : Dimensions . get ( 'window' ) . width ,
121+ height : ( Dimensions . get ( 'window' ) . width * 3 ) / 2 ,
122+ } }
123+ />
124+ </ Pressable >
125+ </ Portal >
126+ ) }
127+ </ TouchableWithoutFeedback >
128+ ) ;
128129} ;
129130
130131const NovelTitle = ( {
@@ -286,10 +287,14 @@ const styles = StyleSheet.create({
286287 linearGradient : {
287288 flex : 1 ,
288289 } ,
289- novelThumbnail : {
290+ novelThumbnailContainer : {
290291 height : 150 ,
291292 width : 100 ,
292293 marginHorizontal : 4 ,
294+ } ,
295+ novelThumbnail : {
296+ height : 150 ,
297+ width : 100 ,
293298 borderRadius : 6 ,
294299 backgroundColor : coverPlaceholderColor ,
295300 } ,
0 commit comments