File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
app/src/main/java/com/infomaniak/swisstransfer/ui/screen/newtransfer/upload Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -22,32 +22,31 @@ import androidx.annotation.StringRes
22
22
import androidx.compose.runtime.Composable
23
23
import androidx.compose.ui.res.stringResource
24
24
import androidx.compose.ui.text.AnnotatedString
25
+ import com.airbnb.lottie.compose.LottieConstants
25
26
import com.infomaniak.swisstransfer.R
26
27
import com.infomaniak.swisstransfer.ui.utils.TextUtils
27
28
28
29
enum class UploadProgressAdType (
29
30
@StringRes private val descriptionTemplate : Int ,
30
31
@StringRes private val descriptionAccentuatedPart : Int ,
31
32
@RawRes val illustration : Int ,
32
- val shouldReverseOnRepeat : Boolean ,
33
+ val iterations : Int = LottieConstants . IterateForever ,
33
34
) {
34
35
INDEPENDENCE (
35
36
R .string.uploadProgressDescriptionTemplateIndependence,
36
37
R .string.uploadProgressDescriptionArgumentIndependence,
37
38
R .raw.swiss_with_flag,
38
- true ,
39
+ 1 ,
39
40
),
40
41
ENERGY (
41
42
R .string.uploadProgressDescriptionTemplateEnergy,
42
43
R .string.uploadProgressDescriptionArgumentEnergy,
43
44
R .raw.mountain_gondola,
44
- false ,
45
45
),
46
46
CONFIDENTIALITY (
47
47
R .string.uploadProgressDescriptionTemplateConfidentiality,
48
48
R .string.uploadProgressDescriptionArgumentConfidentiality,
49
49
R .raw.metallic_safe,
50
- false ,
51
50
);
52
51
53
52
@Composable
Original file line number Diff line number Diff line change @@ -75,8 +75,7 @@ fun ColumnScope.AdHeader(adScreenType: UploadProgressAdType) {
75
75
LottieAnimation (
76
76
composition,
77
77
isPlaying = true ,
78
- reverseOnRepeat = adScreenType.shouldReverseOnRepeat,
79
- iterations = LottieConstants .IterateForever ,
78
+ iterations = adScreenType.iterations,
80
79
)
81
80
82
81
WeightOneSpacer (minHeight = Margin .Medium )
You can’t perform that action at this time.
0 commit comments