Improve BubbleStateProvider (and this removes duplicated values!)
This commit is contained in:
parent
016cb6529f
commit
bdae51f252
45 changed files with 52 additions and 139 deletions
|
|
@ -22,33 +22,18 @@ import io.element.android.features.messages.timeline.model.TimelineItemGroupPosi
|
|||
open class BubbleStateProvider : PreviewParameterProvider<BubbleState> {
|
||||
override val values: Sequence<BubbleState>
|
||||
get() = sequenceOf(
|
||||
BubbleState(TimelineItemGroupPosition.First, isMine = false, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.First, isMine = false, isHighlighted = true),
|
||||
BubbleState(TimelineItemGroupPosition.First, isMine = false, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.First, isMine = false, isHighlighted = true),
|
||||
BubbleState(TimelineItemGroupPosition.First, isMine = true, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.First, isMine = true, isHighlighted = true),
|
||||
BubbleState(TimelineItemGroupPosition.First, isMine = true, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.First, isMine = true, isHighlighted = true),
|
||||
|
||||
BubbleState(TimelineItemGroupPosition.Middle, isMine = false, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.Middle, isMine = false, isHighlighted = true),
|
||||
BubbleState(TimelineItemGroupPosition.Middle, isMine = false, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.Middle, isMine = false, isHighlighted = true),
|
||||
BubbleState(TimelineItemGroupPosition.Middle, isMine = true, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.Middle, isMine = true, isHighlighted = true),
|
||||
BubbleState(TimelineItemGroupPosition.Middle, isMine = true, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.Middle, isMine = true, isHighlighted = true),
|
||||
|
||||
BubbleState(TimelineItemGroupPosition.Last, isMine = false, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.Last, isMine = false, isHighlighted = true),
|
||||
BubbleState(TimelineItemGroupPosition.Last, isMine = false, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.Last, isMine = false, isHighlighted = true),
|
||||
BubbleState(TimelineItemGroupPosition.Last, isMine = true, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.Last, isMine = true, isHighlighted = true),
|
||||
BubbleState(TimelineItemGroupPosition.Last, isMine = true, isHighlighted = false),
|
||||
BubbleState(TimelineItemGroupPosition.Last, isMine = true, isHighlighted = true),
|
||||
)
|
||||
TimelineItemGroupPosition.First,
|
||||
TimelineItemGroupPosition.Middle,
|
||||
TimelineItemGroupPosition.Last,
|
||||
).map { groupPosition ->
|
||||
sequenceOf(false, true).map { isMine ->
|
||||
sequenceOf(false, true).map { isHighlighted ->
|
||||
BubbleState(groupPosition, isMine = isMine, isHighlighted = isHighlighted)
|
||||
}
|
||||
}
|
||||
.flatten()
|
||||
}
|
||||
.flatten()
|
||||
}
|
||||
|
||||
fun aBubbleState() = BubbleState(
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:616292d2609bbfa03b1f2969fb75bf5e5bf18783b88d5e5e8ffab4dd998988e7
|
||||
size 5583
|
||||
oid sha256:914a5874d9fb8a82f74daf728c19710701410eb0fe63b21a39d7657068e5298b
|
||||
size 5786
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e0de328a5e224b6cf640941bd30de0b7ba19f50cf2a351e94f85944b6d96b4ad
|
||||
size 5797
|
||||
oid sha256:efeafd5bafa07cdadba2eaee95d0532b20a644ae0a3065e097221b4af9c735cc
|
||||
size 6039
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dc23e363f94ab335a325c601d2d248cf280f79b705fa34d53567c442d90cb895
|
||||
size 5661
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:998ac94f357159347f7d1d5f29269a28b0dba12f0c7df474eddccb22b03f8c46
|
||||
size 5845
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dc23e363f94ab335a325c601d2d248cf280f79b705fa34d53567c442d90cb895
|
||||
size 5661
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:998ac94f357159347f7d1d5f29269a28b0dba12f0c7df474eddccb22b03f8c46
|
||||
size 5845
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6edb3f9da5314449eab7d0a08d9972a4783dab0283e10291b84f6afa215d1c22
|
||||
size 5709
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:24da4ecdee021fa631e5c0d13f02d4ad2675ceb3893da331d00bf197e725da21
|
||||
size 6016
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6edb3f9da5314449eab7d0a08d9972a4783dab0283e10291b84f6afa215d1c22
|
||||
size 5709
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:24da4ecdee021fa631e5c0d13f02d4ad2675ceb3893da331d00bf197e725da21
|
||||
size 6016
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:38ca7901ccdb5a9f0f7f081dbd3e3e9fce30b90f03df692513021019a8cfb52e
|
||||
size 5708
|
||||
oid sha256:646080d3cb7d8082c2a98b33768977cc0a7b8bfd2a295167a8b4888011e76672
|
||||
size 5792
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:914a5874d9fb8a82f74daf728c19710701410eb0fe63b21a39d7657068e5298b
|
||||
size 5786
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:efeafd5bafa07cdadba2eaee95d0532b20a644ae0a3065e097221b4af9c735cc
|
||||
size 6039
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:914a5874d9fb8a82f74daf728c19710701410eb0fe63b21a39d7657068e5298b
|
||||
size 5786
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:efeafd5bafa07cdadba2eaee95d0532b20a644ae0a3065e097221b4af9c735cc
|
||||
size 6039
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1abe1890f2646b64bf004f16483bc33008b81be8677564368b9e2f226fbb134f
|
||||
size 6010
|
||||
oid sha256:e7bc1800f68ee9f9845a5412bea10a6c1d7ff9ff209557dd8da4c91e6bf137e5
|
||||
size 6048
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:646080d3cb7d8082c2a98b33768977cc0a7b8bfd2a295167a8b4888011e76672
|
||||
size 5792
|
||||
oid sha256:616292d2609bbfa03b1f2969fb75bf5e5bf18783b88d5e5e8ffab4dd998988e7
|
||||
size 5583
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e7bc1800f68ee9f9845a5412bea10a6c1d7ff9ff209557dd8da4c91e6bf137e5
|
||||
size 6048
|
||||
oid sha256:e0de328a5e224b6cf640941bd30de0b7ba19f50cf2a351e94f85944b6d96b4ad
|
||||
size 5797
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:646080d3cb7d8082c2a98b33768977cc0a7b8bfd2a295167a8b4888011e76672
|
||||
size 5792
|
||||
oid sha256:dc23e363f94ab335a325c601d2d248cf280f79b705fa34d53567c442d90cb895
|
||||
size 5661
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e7bc1800f68ee9f9845a5412bea10a6c1d7ff9ff209557dd8da4c91e6bf137e5
|
||||
size 6048
|
||||
oid sha256:998ac94f357159347f7d1d5f29269a28b0dba12f0c7df474eddccb22b03f8c46
|
||||
size 5845
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:616292d2609bbfa03b1f2969fb75bf5e5bf18783b88d5e5e8ffab4dd998988e7
|
||||
size 5583
|
||||
oid sha256:6edb3f9da5314449eab7d0a08d9972a4783dab0283e10291b84f6afa215d1c22
|
||||
size 5709
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e0de328a5e224b6cf640941bd30de0b7ba19f50cf2a351e94f85944b6d96b4ad
|
||||
size 5797
|
||||
oid sha256:24da4ecdee021fa631e5c0d13f02d4ad2675ceb3893da331d00bf197e725da21
|
||||
size 6016
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d774fca7f28623d7e464c233e5e2282b5c7d608d7aa6084b2350a4f71765bc5a
|
||||
size 4809
|
||||
oid sha256:dfaa4d6032641b332b111b20c81ec4bca917391cf122a06718fca7da849a7c94
|
||||
size 5124
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:32c81961535a22ce1fccc15865cd76bc9844168552a2205f7f7342398866b622
|
||||
size 5109
|
||||
oid sha256:ac3eb3ebe9f2f30224389586f9b5901106b73cee9f5b4cdeb0f76b313ba0cd31
|
||||
size 5384
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bd53dc603b4689eabe41e5d90ea0d8a70b769d60082ee57eee556ef9a7ea24ec
|
||||
size 4984
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:43e08e7c243192571121595483ddc2dd44b56892afff5ae949ac224cad13e73f
|
||||
size 5165
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bd53dc603b4689eabe41e5d90ea0d8a70b769d60082ee57eee556ef9a7ea24ec
|
||||
size 4984
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:43e08e7c243192571121595483ddc2dd44b56892afff5ae949ac224cad13e73f
|
||||
size 5165
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7c61846e0037aa7a4d6f146fa4f2b441654570db082b3f506bb6f49aa01f3999
|
||||
size 4944
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:137bfee9d776c8abff1a2428e3edc1c28cc7ca21d9849640e2aad2d945d7f7f2
|
||||
size 5361
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7c61846e0037aa7a4d6f146fa4f2b441654570db082b3f506bb6f49aa01f3999
|
||||
size 4944
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:137bfee9d776c8abff1a2428e3edc1c28cc7ca21d9849640e2aad2d945d7f7f2
|
||||
size 5361
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ace5a91e960c6570647e2b8ad2de428ba474e48531a2f74ab267d07668d7a9e8
|
||||
size 4928
|
||||
oid sha256:8e0eaf65f627b7be068311b0c8f52cfbe847571684a0c63dda3e7c0621eac42c
|
||||
size 5133
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dfaa4d6032641b332b111b20c81ec4bca917391cf122a06718fca7da849a7c94
|
||||
size 5124
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ac3eb3ebe9f2f30224389586f9b5901106b73cee9f5b4cdeb0f76b313ba0cd31
|
||||
size 5384
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dfaa4d6032641b332b111b20c81ec4bca917391cf122a06718fca7da849a7c94
|
||||
size 5124
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ac3eb3ebe9f2f30224389586f9b5901106b73cee9f5b4cdeb0f76b313ba0cd31
|
||||
size 5384
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:aec5d74e6f4d316c1ea124dc50e2abbfd22d6ee94b6d82519b3f9cab7a191dfa
|
||||
size 5348
|
||||
oid sha256:8359444a65d74682106930a7bbc6fb171acb95446cc5ff67eefa0dadc51e5932
|
||||
size 5397
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8e0eaf65f627b7be068311b0c8f52cfbe847571684a0c63dda3e7c0621eac42c
|
||||
size 5133
|
||||
oid sha256:d774fca7f28623d7e464c233e5e2282b5c7d608d7aa6084b2350a4f71765bc5a
|
||||
size 4809
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8359444a65d74682106930a7bbc6fb171acb95446cc5ff67eefa0dadc51e5932
|
||||
size 5397
|
||||
oid sha256:32c81961535a22ce1fccc15865cd76bc9844168552a2205f7f7342398866b622
|
||||
size 5109
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8e0eaf65f627b7be068311b0c8f52cfbe847571684a0c63dda3e7c0621eac42c
|
||||
size 5133
|
||||
oid sha256:bd53dc603b4689eabe41e5d90ea0d8a70b769d60082ee57eee556ef9a7ea24ec
|
||||
size 4984
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8359444a65d74682106930a7bbc6fb171acb95446cc5ff67eefa0dadc51e5932
|
||||
size 5397
|
||||
oid sha256:43e08e7c243192571121595483ddc2dd44b56892afff5ae949ac224cad13e73f
|
||||
size 5165
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d774fca7f28623d7e464c233e5e2282b5c7d608d7aa6084b2350a4f71765bc5a
|
||||
size 4809
|
||||
oid sha256:7c61846e0037aa7a4d6f146fa4f2b441654570db082b3f506bb6f49aa01f3999
|
||||
size 4944
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:32c81961535a22ce1fccc15865cd76bc9844168552a2205f7f7342398866b622
|
||||
size 5109
|
||||
oid sha256:137bfee9d776c8abff1a2428e3edc1c28cc7ca21d9849640e2aad2d945d7f7f2
|
||||
size 5361
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue