@@ -37,17 +37,16 @@ pub fn home_widget() -> impl Widget<AppState> {
37
37
}
38
38
39
39
fn simple_title_label ( title : & str ) ->impl Widget < AppState > {
40
- Flex :: column ( )
41
- . with_default_spacer ( )
42
- . with_child ( Label :: new ( title)
43
- . with_text_size ( theme:: grid ( 2.5 ) )
44
- . align_left ( )
45
- . padding ( ( theme:: grid ( 1.5 ) , 0.0 ) )
40
+ Flex :: column ( ) . with_default_spacer ( ) . with_child (
41
+ Label :: new ( title)
42
+ . with_text_size ( theme:: grid ( 2.5 ) )
43
+ . align_left ( )
44
+ . padding ( ( theme:: grid ( 1.5 ) , 0.0 ) ) ,
46
45
)
47
46
}
48
47
49
48
pub fn made_for_you ( ) ->impl Widget < AppState > {
50
- Async :: new ( spinner_widget, loaded_results_widget, ||{ Empty } )
49
+ Async :: new ( spinner_widget, loaded_results_widget, ||Empty )
51
50
. lens (
52
51
Ctx :: make (
53
52
AppState :: common_ctx,
@@ -64,7 +63,7 @@ pub fn made_for_you() -> impl Widget<AppState> {
64
63
}
65
64
66
65
pub fn recommended_stations ( ) ->impl Widget < AppState > {
67
- Async :: new ( spinner_widget, loaded_results_widget, ||{ Empty } )
66
+ Async :: new ( spinner_widget, loaded_results_widget, ||Empty )
68
67
. lens (
69
68
Ctx :: make (
70
69
AppState :: common_ctx,
@@ -82,27 +81,24 @@ pub fn recommended_stations() -> impl Widget<AppState> {
82
81
83
82
fn uniquely_yours_results_widget ( ) ->impl Widget < WithCtx < MixedView > > {
84
83
Either :: new (
85
- |results : & WithCtx < MixedView > , _|{
86
- results. data . playlists . is_empty ( )
87
- } ,
84
+ |results : & WithCtx < MixedView > , _| results. data . playlists . is_empty ( ) ,
88
85
Empty ,
89
- Flex :: column ( ) . with_default_spacer ( )
90
- . with_child ( Label :: new ( "Uniquely yours" )
91
- . with_text_size ( theme:: grid ( 2.5 ) )
92
- . align_left ( )
93
- . padding ( ( theme:: grid ( 1.5 ) , 0.0 ) )
94
- ) . with_child (
95
- Scroll :: new (
96
- Flex :: row ( )
97
- . with_child ( playlist_results_widget ( ) )
86
+ Flex :: column ( )
87
+ . with_default_spacer ( )
88
+ . with_child (
89
+ Label :: new ( "Uniquely yours" )
90
+ . with_text_size ( theme:: grid ( 2.5 ) )
91
+ . align_left ( )
92
+ . padding ( ( theme:: grid ( 1.5 ) , theme:: grid ( 1.5 ) ) ) ,
98
93
)
99
- . align_left ( ) ,
100
- ) ,
94
+ . with_child (
95
+ Scroll :: new ( Flex :: row ( ) . with_child ( playlist_results_widget ( ) ) ) . align_left ( ) ,
96
+ ) ,
101
97
)
102
98
}
103
99
104
100
pub fn uniquely_yours ( ) ->impl Widget < AppState > {
105
- Async :: new ( spinner_widget, uniquely_yours_results_widget, ||{ Empty } )
101
+ Async :: new ( spinner_widget, uniquely_yours_results_widget, ||Empty )
106
102
. lens (
107
103
Ctx :: make (
108
104
AppState :: common_ctx,
@@ -119,7 +115,7 @@ pub fn uniquely_yours() -> impl Widget<AppState> {
119
115
}
120
116
121
117
pub fn user_top_mixes ( ) ->impl Widget < AppState > {
122
- Async :: new ( spinner_widget, loaded_results_widget, ||{ Empty } )
118
+ Async :: new ( spinner_widget, loaded_results_widget, ||Empty )
123
119
. lens (
124
120
Ctx :: make (
125
121
AppState :: common_ctx,
@@ -136,7 +132,7 @@ pub fn user_top_mixes() -> impl Widget<AppState> {
136
132
}
137
133
138
134
pub fn best_of_artists ( ) ->impl Widget < AppState > {
139
- Async :: new ( spinner_widget, loaded_results_widget, ||{ Empty } )
135
+ Async :: new ( spinner_widget, loaded_results_widget, ||Empty )
140
136
. lens (
141
137
Ctx :: make (
142
138
AppState :: common_ctx,
@@ -153,7 +149,7 @@ pub fn best_of_artists() -> impl Widget<AppState> {
153
149
}
154
150
155
151
pub fn your_shows ( ) ->impl Widget < AppState > {
156
- Async :: new ( spinner_widget, loaded_results_widget, ||{ Empty } )
152
+ Async :: new ( spinner_widget, loaded_results_widget, ||Empty )
157
153
. lens (
158
154
Ctx :: make (
159
155
AppState :: common_ctx,
@@ -170,7 +166,7 @@ pub fn your_shows() -> impl Widget<AppState> {
170
166
}
171
167
172
168
pub fn jump_back_in ( ) ->impl Widget < AppState > {
173
- Async :: new ( spinner_widget, loaded_results_widget, ||{ Empty } )
169
+ Async :: new ( spinner_widget, loaded_results_widget, ||Empty )
174
170
. lens (
175
171
Ctx :: make (
176
172
AppState :: common_ctx,
@@ -187,7 +183,7 @@ pub fn jump_back_in() -> impl Widget<AppState> {
187
183
}
188
184
189
185
pub fn shows_that_you_might_like ( ) ->impl Widget < AppState > {
190
- Async :: new ( spinner_widget, loaded_results_widget, ||{ Empty } )
186
+ Async :: new ( spinner_widget, loaded_results_widget, ||Empty )
191
187
. lens (
192
188
Ctx :: make (
193
189
AppState :: common_ctx,