Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8ed31d98c | ||
|
|
e94898c5ac | ||
|
|
f41c69ff4b | ||
|
|
7585767961 | ||
|
|
612c17a8db | ||
|
|
146e41c8cc | ||
|
|
3e93e353db | ||
|
|
4e8ebc6d85 | ||
|
|
7f2623a23e | ||
|
|
080b13c304 | ||
|
|
df2dd56cfb | ||
|
|
bd3c724c66 | ||
|
|
206730a777 | ||
|
|
b3a03119d1 | ||
|
|
d79d2e9d36 | ||
|
|
098821d20b | ||
|
|
92a180c477 | ||
|
|
6722b45076 | ||
|
|
897a5eb201 | ||
|
|
d3667ad683 | ||
|
|
dc9454defa | ||
|
|
53495dc893 | ||
|
|
967c869486 | ||
|
|
f0272f2e77 | ||
|
|
b8dfa6b645 | ||
|
|
6c14fd1cb9 | ||
|
|
e8e8547879 | ||
|
|
2899819e95 |
@@ -351,7 +351,6 @@ component-test: export COMPONENT_TEST := true
|
||||
component-test: export BABEL_ENV := test
|
||||
component-test: ##@test Run tests once in NodeJS
|
||||
# Here we create the gyp bindings for nodejs
|
||||
yarn install
|
||||
yarn shadow-cljs compile component-test && \
|
||||
jest --config=test/jest/jest.config.js
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import com.reactnativenavigation.react.NavigationReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.facebook.react.modules.network.OkHttpClientProvider;
|
||||
import com.cmcewen.blurview.BlurViewPackage;
|
||||
import com.reactnativecommunity.blurview.BlurViewPackage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -125,6 +125,20 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "androidx/annotation/annotation/1.3.0/annotation-1.3.0",
|
||||
"host": "https://dl.google.com/dl/android/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "8e41994f7c27b40c14f53bf3fa40c84d5d00b13d",
|
||||
"sha256": "1c7vbr32dpv70xk92p10mj082ddgxb291p7w562vqjva4p2ig584"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "021f49f5f9b85fc49de712539f79123119740595",
|
||||
"sha256": "0lw5xq2qlpis7qh7hqgw8my4g484z7lvdf22v8hy98g3xyplbp4p"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "androidx/appcompat/appcompat-resources/1.1.0/appcompat-resources-1.1.0",
|
||||
"host": "https://dl.google.com/dl/android/maven2",
|
||||
@@ -3975,6 +3989,20 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/github/Dimezis/BlurView/version-2.0.2/BlurView-version-2.0.2",
|
||||
"host": "https://jitpack.io",
|
||||
"type": "aar",
|
||||
"pom": {
|
||||
"sha1": "7b29beaf53b0e649c9598b61a2ba6432e0d9f63b",
|
||||
"sha256": "002clz76ds41wn2dz5qy57r9xl437dl75zy2nxzrhv4cp45jiypc"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "519c2433da424f955c805bbc54466d3b10289466",
|
||||
"sha256": "01rrg39davjar4hld6j0i3rjcajii66z50dpjy668431wchwxs4j"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/github/status-im/function/0.0.1/function-0.0.1",
|
||||
"host": "https://jitpack.io",
|
||||
@@ -4059,20 +4087,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/eightbitlab/blurview/1.6.6/blurview-1.6.6",
|
||||
"host": "https://plugins.gradle.org/m2",
|
||||
"type": "aar",
|
||||
"pom": {
|
||||
"sha1": "489f224c45b0b1de96491381bdaa181ccae964a2",
|
||||
"sha256": "0xjrxz13zkw789npq0d96bxsi5w6f6mjnh9cbnlk3i8gc4c4906q"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "6457c0c2928b4580764fafa88ae67a9b451ff0ef",
|
||||
"sha256": "03y7j7vjyjhqw9imk5wzqghanqh8q541dlhzrmpbdk2sp8hy3cnq"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/facebook/fresco/drawee/2.2.0/drawee-2.2.0",
|
||||
"host": "https://plugins.gradle.org/m2",
|
||||
@@ -5806,26 +5820,26 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/google/auto/value/auto-value-annotations/1.9/auto-value-annotations-1.9",
|
||||
"path": "com/google/auto/value/auto-value-annotations/1.10.1/auto-value-annotations-1.10.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "a5c14e2bc293fe9d24d4ec21c2ba966e4832313d",
|
||||
"sha256": "12n9z19gvs617f18p2n2p9k8ci1kz06y9c31y0s97ivmpvda684j"
|
||||
"sha1": "72aa2e866fd52dc58222aacc490b6f469ff8a50f",
|
||||
"sha256": "0ixh52nx4b2l2hc9s16hm4f4rmhg8sjy9was9pxlv46ijj3crflz"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "25a0fcef915f663679fcdb447541c5d86a9be4ba",
|
||||
"sha256": "0i406m8xyahcza6rj32y1j54kinbkl5anczhv2i9irafqks6jm7s"
|
||||
"sha1": "9e5162c15f6033c524134cba05a5e93dc1d37c4b",
|
||||
"sha256": "1qiblzy89vnlyhg8kx9iz4ds2w8ixriifx0da6l3is9534hhmzm4"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/google/auto/value/auto-value-parent/1.9/auto-value-parent-1.9",
|
||||
"path": "com/google/auto/value/auto-value-parent/1.10.1/auto-value-parent-1.10.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "a5a5f16386e4889a6bc0b98c6f6caced5f15764f",
|
||||
"sha256": "11yprfs5ggj5pff2bzzbywqy1n6bdf071qfph6wcl0cncgzrsg9f"
|
||||
"sha1": "cfd31b18489357b9f2b0acee57d6674394575c37",
|
||||
"sha256": "1sfgfdwkz8yvyqakni8b3syx6cjahfm36wnd8j3qpqdw32pa6bgp"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6080,16 +6094,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/google/errorprone/error_prone_annotations/2.15.0/error_prone_annotations-2.15.0",
|
||||
"path": "com/google/errorprone/error_prone_annotations/2.18.0/error_prone_annotations-2.18.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "dd12a10c4b267375dc32938dcec2c986793af9dc",
|
||||
"sha256": "1rmisaislm0sjrnpibwqflws1hj6yq2wj0y2i6rbn7k869z63bkv"
|
||||
"sha1": "6d7bbfd3d7567e4c18e981a675ecda707e8a2db1",
|
||||
"sha256": "1p5xswxnd9cjz1b2zldws560ld4dlm17c0awb9xr39fcgmwka0cj"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "38c8485a652f808c8c149150da4e5c2b0bd17f9a",
|
||||
"sha256": "1sy40pwq5rk87zpa0mccn8g3m7xgq38xkynvbfd7irs98dqlfw06"
|
||||
"sha1": "89b684257096f548fa39a7df9fdaa409d4d4df91",
|
||||
"sha256": "1bjlxady2jg83lmicb2jil2vf6zjm29sj1qvznj8hsc1f75i8s4y"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6134,12 +6148,12 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/google/errorprone/error_prone_parent/2.15.0/error_prone_parent-2.15.0",
|
||||
"path": "com/google/errorprone/error_prone_parent/2.18.0/error_prone_parent-2.18.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "1b5a27fd2ae711b10befa9e182583b455ec043ea",
|
||||
"sha256": "122zlnx5hfah9yjbhyfic0fndyd5vbgvlwsj82crmimagb8srp0i"
|
||||
"sha1": "b1779a677965027cd2a3de91e61a80102086bb30",
|
||||
"sha256": "1bazw49mb0246s2nbkxvynk3npayk1vq6vzivs8n6imzqycjxwj7"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6364,16 +6378,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3",
|
||||
"path": "com/google/j2objc/j2objc-annotations/2.8/j2objc-annotations-2.8",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "47e0dd93285dcc6b33181713bc7e8aed66742964",
|
||||
"sha256": "0mghlfk0zwyv9qqd8x6p5yx4dspwnbypscrhhx2ywnqip8jaib2z"
|
||||
"sha1": "c8daacea97066c6826844e2175ec89857e598122",
|
||||
"sha256": "1y0ipx6xa6f501c9p17sz1g76l7yfq99xylbj4y131c3n6c7gy1p"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "ba035118bc8bac37d7eff77700720999acd9986d",
|
||||
"sha256": "0ysaws2dawf41raccmprx8vilr5nrh6d5d70q0i63gb74b4k1br1"
|
||||
"sha1": "c85270e307e7b822f1086b93689124b89768e273",
|
||||
"sha256": "1vfnyjvjmkjdnzwfz42jlchx22gpgpxx17w5xnryv5ay3bx9aaph"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6616,16 +6630,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okhttp3/okhttp-jvm/5.0.0-alpha.10/okhttp-jvm-5.0.0-alpha.10",
|
||||
"path": "com/squareup/okhttp3/okhttp-jvm/5.0.0-alpha.11/okhttp-jvm-5.0.0-alpha.11",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "3bb222ca233ea82dbb53cbafeda8742ae18d82d5",
|
||||
"sha256": "0a6isgq2q71y8dg06wy145ib54r0zpq2rhpp9jlscx9mdj5hxp4b"
|
||||
"sha1": "5ae4f0042d68acdbe76fb3a1312cef5bb030c2fb",
|
||||
"sha256": "1x6ji9dwic2y78qjf1jjxvvhmmb7csaswxzxzsw3gb6ccvywffqk"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "27e6e9807cb38ce2f05145ce58ec79eb7c761004",
|
||||
"sha256": "12a6p4x081cy21r1faps50syrrxlm6wyfi3kq9wkxb72vp2bsph4"
|
||||
"sha1": "d29775a9116a8239cea8b969e63bfe7ea8794f94",
|
||||
"sha256": "106gnkylwirqp7am147j65jr8i4sswy83y67f1avb6czp8x1ssjh"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6700,16 +6714,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okhttp3/okhttp/5.0.0-alpha.10/okhttp-5.0.0-alpha.10",
|
||||
"path": "com/squareup/okhttp3/okhttp/5.0.0-alpha.11/okhttp-5.0.0-alpha.11",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "fafc3d889175af9dbd5f94eaaaa153cfdfe902dd",
|
||||
"sha256": "1klkbcnwv09y7blx5aqb9lfkbcc44wi26cpcgz4ralmrbj1xm9vz"
|
||||
"sha1": "a0b59e69a18b0d5e919cf259085181f7327c583e",
|
||||
"sha256": "1g8y1yf42i0rj8q7812g8yw87vg20p6rgaxlbgmcmd8agr2pza6l"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "e23242be21a6110a025a72297ecc02246b189768",
|
||||
"sha256": "01m2i0jgx21rv119rb51zkdql2zqhf3pprdfhdd6sjw0wcqdkzw0"
|
||||
"sha1": "c971e8f02ddb288a0311cc80b6268091e20299fc",
|
||||
"sha256": "13mv7bfkrs1ds4r36jxqvgzzajs0ayrl8zshyp838mf12x2cz5wk"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6757,6 +6771,20 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okio/okio-jvm/3.3.0/okio-jvm-3.3.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "441db5e3f85f26d8891b7ae05cffb9a1a67ee54f",
|
||||
"sha256": "1khq6z9w0mlbvi6kzg3vm0k5c593z7iv360f9kdvflgyj05hw026"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "2d175add2d06a67bda111ae5455e49b42d0bb287",
|
||||
"sha256": "08kj4ggh8kv2k1i4yxd9i0jxlf3b4ajdfsjcqxmx9mr0xhbq9ynz"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okio/okio-parent/1.15.0/okio-parent-1.15.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
@@ -6806,16 +6834,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okio/okio/3.2.0/okio-3.2.0",
|
||||
"path": "com/squareup/okio/okio/3.3.0/okio-3.3.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "85284557b21661be1c4983910fef4e35532e1e34",
|
||||
"sha256": "18bjm7rix9msw1appzy561cndbadby3acn0x6rw13swskf6zailb"
|
||||
"sha1": "8b5abd4bc3965b81e4c8c718bfabdac9afbebe7b",
|
||||
"sha256": "17y5pjl0iaykk6m6sbkhv8xz674kmwpy8vdgqpkxldrjk6hq9a6m"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "afd4b7185a6976c2ac6bfb7b126c257ee9b3e765",
|
||||
"sha256": "0bafpq8mqf52d7rmj6hkx3zq3m0lifq7vy3hczickdi9435k5afw"
|
||||
"sha1": "c3ad4568143c88518e82eb63de30e2d3de011439",
|
||||
"sha256": "1idbgxrq7lhx38hn13s8kxx9qkh2bn86kflbw5ch2wz59q4m488g"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6902,12 +6930,12 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/sun/xml/bind/jaxb-bom-ext/4.0.0/jaxb-bom-ext-4.0.0",
|
||||
"path": "com/sun/xml/bind/jaxb-bom-ext/4.0.1/jaxb-bom-ext-4.0.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "d2303dfd6470d2818a64d07ed969f9a471774235",
|
||||
"sha256": "0nzmw546aqn4wixciv3j9wfp9l072vv0p90jm4l9i22vi3rgr87m"
|
||||
"sha1": "6916f1573d78b0d41b629257277da86215ea7a6f",
|
||||
"sha256": "069gm0wclljzdjn5j29hizhc4rakszk8kgzmsx66h5fkvlcvgd5b"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6922,12 +6950,12 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/sun/xml/bind/mvn/jaxb-parent/4.0.0/jaxb-parent-4.0.0",
|
||||
"path": "com/sun/xml/bind/mvn/jaxb-parent/4.0.1/jaxb-parent-4.0.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "4a804d0d195e0c7676e2d53a945e5565dbd3b619",
|
||||
"sha256": "07c3rg958m5a6z4ah4cf2a4lr3wcrpvrfp7x18pdb0q3llixk82r"
|
||||
"sha1": "315ec09b889041008f815ddd41cca9633ee50cc4",
|
||||
"sha256": "1bpqac2a25qq81h99zvj20n9ac2hd8iry7mnwisvd4f8avpm272i"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6952,12 +6980,12 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.0/jaxb-txw-parent-4.0.0",
|
||||
"path": "com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.1/jaxb-txw-parent-4.0.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "0cb0239b1a0c5443e33444be9b9259185161d62c",
|
||||
"sha256": "0pwxa7rprjz756vfcr9njrvrrcial81l0cdq309gg4rgf9xmi42z"
|
||||
"sha1": "0f5e6242fe24ccd5e4c663dc66f7b935b4cffb55",
|
||||
"sha256": "1niyxycc1k9qb0hpkb30zcccai28pq4yhy9a8p45d24zgrvdgs1a"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -7142,16 +7170,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "jakarta/activation/jakarta.activation-api/2.1.0/jakarta.activation-api-2.1.0",
|
||||
"path": "jakarta/activation/jakarta.activation-api/2.1.1/jakarta.activation-api-2.1.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "1bc038c214c6d75cbd589085129f4ac3dc0ad825",
|
||||
"sha256": "01ib1ivdy9d3168cmsc1kqc46d9dal83f5ldgv1sxq4jrisjl3c7"
|
||||
"sha1": "0c6e1dbee7b7faf7c9c8b7274a8b6279415cac6a",
|
||||
"sha256": "006awx3sv5lc6ngsnrvgij6m9dhhrxqwy1gkkf3p9agdxzw5jck9"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "a58861b5deac5e151140511cf57d6b80a83f2d20",
|
||||
"sha256": "1irm65mcwzb973lj1dy25b8ihvznh8a2jq4c2cl9rr2z16adks2n"
|
||||
"sha1": "88c774ab863a21fb2fc4219af95379fafe499a31",
|
||||
"sha256": "010s9784kcs97whlpyy7pd2dp71m62hh5n41zix5mfrdy7qf7fik"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -7588,16 +7616,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/antlr/ST4/4.3.3/ST4-4.3.3",
|
||||
"path": "org/antlr/ST4/4.3.4/ST4-4.3.4",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "b4f7cf090a00317d932cccc48839e1af69ad13d6",
|
||||
"sha256": "1yc2rfblb9iljnggvw1l539zpa459ywq4gyq28s6nbb4q9jqjhhg"
|
||||
"sha1": "24c80ba529f26698567f91773d24f8c01e1bfa73",
|
||||
"sha256": "0gnamd4wc2g3pazk60pph1zmp7bjcdcrw20kih7486cr90z1yz4y"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "2a894d43f827164bcf4dc0ef54fa8c0b9c51d50c",
|
||||
"sha256": "1kjv9xkr3n86fnnhhii5irmg50d4nk7lljcpwphdz3mlapc3sl34"
|
||||
"sha1": "bf68d049dd4e6e104055a79ac3bf9e6307d29258",
|
||||
"sha256": "0czz2px3pdzd2sb2j29m6401xlmfacm9fs7cnpw4kms69hwaq9zr"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -7622,12 +7650,12 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/antlr/antlr4-master/4.10.1/antlr4-master-4.10.1",
|
||||
"path": "org/antlr/antlr4-master/4.11.1/antlr4-master-4.11.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "2751660ffcd936b85c516fe06a1e11ef80c81f55",
|
||||
"sha256": "1lsh7w3k4wjy3a888a84xx95ska1zfny2a9rl0c7xlkrqdjj3vbp"
|
||||
"sha1": "298ecf68d872658e1d92457168018bd5b8fff245",
|
||||
"sha256": "1b80dq56qs5rqzbvq5pyf2pcsgfmmfmsmznhbxw1armvvbl5vskj"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -7646,16 +7674,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/antlr/antlr4-runtime/4.10.1/antlr4-runtime-4.10.1",
|
||||
"path": "org/antlr/antlr4-runtime/4.11.1/antlr4-runtime-4.11.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "ec1f73e67838deac61aca93e4334b8e96a8d6562",
|
||||
"sha256": "19qqf61qaw7m8azlgs3x1609r54h108qvhrac205q31gkm60bki9"
|
||||
"sha1": "b76aa0c70639f8b3112e4d5e14abf951cb38761c",
|
||||
"sha256": "0d0vd3nh9f2aqy4njx4d0qh7jwha83crmxkyplgmk307b4lyqmn4"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "10839f875928f59c622d675091d51a43ea0dc5f7",
|
||||
"sha256": "0d0kin4s2ayga69cp944k47w8s9j39gx0043f2y2kyxck06bwrns"
|
||||
"sha1": "069214c1de1960040729702eb58deac8827135e7",
|
||||
"sha256": "0nfsdach3x0vyv1isnvvjp7hif0kdzyb1i1f0lv4vhfcq59nav70"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8104,16 +8132,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13",
|
||||
"path": "org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "e5b134e5cd3e28dc431ca5397e9b53d28d1cfa74",
|
||||
"sha256": "0v3yzl9za0aqyixq2pwxq9fa8hb84d4lzp3ss1iwv7wjfkd9msvq"
|
||||
"sha1": "f62c6a311407cc4b47d0ea9eec6cf97ed25b8cee",
|
||||
"sha256": "1dzgpmfzri6vjlh5nwhc12ppw2p98wm79gafy178l2pq9jpmb0zi"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "e5f6cae5ca7ecaac1ec2827a9e2d65ae2869cada",
|
||||
"sha256": "0hzp3vrxbnyc6w86v671wp0zchb634rgrwwcc00m0skcarm05sbg"
|
||||
"sha1": "1194890e6f56ec29177673f2f12d0b8e627dec98",
|
||||
"sha256": "1mp9g0s4j6rq0i5i0cp7fvz8pdn4y6mvnbhdyircxm56a4f7xg68"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8178,12 +8206,12 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/httpcomponents/httpcomponents-client/4.5.13/httpcomponents-client-4.5.13",
|
||||
"path": "org/apache/httpcomponents/httpcomponents-client/4.5.14/httpcomponents-client-4.5.14",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "61045e5bac5f6b0a7e3301053de0d78fc92f09db",
|
||||
"sha256": "1nadil2zd0nzspkla2wihfaycfdv4bb4b60fqb872wnv1165kflw"
|
||||
"sha1": "e36b5c26d9012cce0ba214e06462596585475217",
|
||||
"sha256": "0qd09a8gcl8b85jjsgahril4mmmsril9h24xz1cpci01y7j1vbav"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8238,12 +8266,12 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/httpcomponents/httpcomponents-core/4.4.15/httpcomponents-core-4.4.15",
|
||||
"path": "org/apache/httpcomponents/httpcomponents-core/4.4.16/httpcomponents-core-4.4.16",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "3533a4d4bbf8fb489bc20795ba2826d3a95baa7d",
|
||||
"sha256": "02d5ijdcvj5gkx5wb90h84y7zr1jqsf3xy8pmv408j0plqkkgm30"
|
||||
"sha1": "e0cbfde0384168cdd90e2633c1f101416d799090",
|
||||
"sha256": "1xxp7llaxmary752yrjajj8l12pqarnna8dz762x2fj25ln5mmzj"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8338,16 +8366,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/httpcomponents/httpcore/4.4.15/httpcore-4.4.15",
|
||||
"path": "org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "fcd592279d3c26678aad344894e20f9a01102a16",
|
||||
"sha256": "0sxyq51hjv24rw14kiwwlz2qscj07l5s6wa3qc7n5fw8iamgxb19"
|
||||
"sha1": "fdcd45abd94151f990a359e1d367e325cfb50286",
|
||||
"sha256": "1ynpdjf3jzpcdv9b0h8i4v1jdh13qsiavb9ixingxb2xnd4xifiw"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "7f2e0c573eaa7a74bac2e89b359e1f73d92a0a1d",
|
||||
"sha256": "0hmi3c0p5a2m2v53i0fqmdqm3677q2fz6n6ydpwi16j9ih4fvfiw"
|
||||
"sha1": "51cf043c87253c9f58b539c9f7e44c8894223850",
|
||||
"sha256": "0ks69r3jmr96y1ll8415a6wg583mdynrmlrsw9lc97d08b8kv6vc"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8512,16 +8540,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/checkerframework/checker-qual/3.24.0/checker-qual-3.24.0",
|
||||
"path": "org/checkerframework/checker-qual/3.29.0/checker-qual-3.29.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "9efc0cf7e676e3bfd657f2448b9e0f5a859db1b6",
|
||||
"sha256": "0c82l3k1hha9sx1fag8k8bajc95yydpf47kq656x9bv6x4dc6i7g"
|
||||
"sha1": "76bd5ffeef4d9b039e6445e2674264dbc5bfb94c",
|
||||
"sha256": "0azs4ndih02r5a3fvn08sndwc58ymzma2krqclfz6pivmfrxcyp2"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "ee5d53d9c771635ead83bff900f8f9a29f77174e",
|
||||
"sha256": "0yxvfdg4sn9zi9l7x5fwrp43sc3qhjy0pqm94gqfv1dlwga8klfs"
|
||||
"sha1": "a805a761b7a734d69f9c1766ead1ff78698a1497",
|
||||
"sha256": "1hb8ajlszzvh3cimvzkwgkx2689rh131jh7259a7s94cvzjq1p77"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8690,50 +8718,50 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/easymock/easymock-parent/4.3/easymock-parent-4.3",
|
||||
"path": "org/easymock/easymock-parent/5.1.0/easymock-parent-5.1.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "efbf2d2d75a77ae5f4c88faf83e492f962341700",
|
||||
"sha256": "0jgk3vj299dgw4qiaqh86nfzidnfgxpz577pg962mkv04wp212c3"
|
||||
"sha1": "aa65d01ea878d85642ac56c6e68504725613933e",
|
||||
"sha256": "1ivahq8x7lihn61nxv9hirqwmpz2mpy8nm6045rfb7w4g2mq93k0"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/easymock/easymock/4.3/easymock-4.3",
|
||||
"path": "org/easymock/easymock/5.1.0/easymock-5.1.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "a392122f9847ec2d4ae7ce79064b9db5741c44b7",
|
||||
"sha256": "0vifpca8nkibc0qdk807a4y5v4myml8nbfdjwwdqrx5s25hhw7jh"
|
||||
"sha1": "3f78c28fe129d1af50f3fd3e153ededd0e5c77c2",
|
||||
"sha256": "059pjirrbw2m904ac3402a1nybj8fxp8kj71l5vj29id0pjsp2sg"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "b0dbe2df1a71b8115835561f46a8f06cb168a94f",
|
||||
"sha256": "010ldl2zss4hp204y2w6dl0kwb9llh0fx7mldfm6lqqiid68cc62"
|
||||
"sha1": "0b699beae4f519f06c587674b62dcfe5fb437f1c",
|
||||
"sha256": "16nwd28d3yphrckq9n9l8pys6l78jq113c96zgif6nr77syq699z"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/eclipse/angus/angus-activation-project/1.0.0/angus-activation-project-1.0.0",
|
||||
"path": "org/eclipse/angus/angus-activation-project/2.0.0/angus-activation-project-2.0.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "fefd9a38a0abae6780322724ea4ed109cf89424c",
|
||||
"sha256": "1mcw487y2l4mflh4l8kk32mgvas439vxn33b613h6qfirjblkfn5"
|
||||
"sha1": "6fafee47a73b1ee5dc0f533bcaebc55743bbee84",
|
||||
"sha256": "17ffihwphiw6vzwxb3gkrxbjcsby640wmadj43rbcfamn6icwrjx"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/eclipse/angus/angus-activation/1.0.0/angus-activation-1.0.0",
|
||||
"path": "org/eclipse/angus/angus-activation/2.0.0/angus-activation-2.0.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "eae5ca0cd97af06e4aa0bb6114d12ae08dde9d95",
|
||||
"sha256": "1z5hl5hhr16si1ih4qdxgqvymq09rh2n8d4zivr9sjzgbd193irg"
|
||||
"sha1": "87500cdbfdcb4758ece7ca2267469a590e2d9fb9",
|
||||
"sha256": "1sb92gyb9fk3fqysrsr021wdan191i6wgq845gkf4lnk4rbgcqsr"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "0f0ceddd49f92109fbfad9125e958f5bfd3f2aa1",
|
||||
"sha256": "0i92hg8qd8fkacnv0mqjs2zqqiz7hp67iyx91b2liv8qgqagyyp3"
|
||||
"sha1": "72369f4e2314d38de2dcbb277141ef0226f73151",
|
||||
"sha256": "0iwi0y1ksir12z47gc0q7y7bfxnylf9yxdprix2sjnpkl0hx64is"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8800,12 +8828,12 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/glassfish/jaxb/jaxb-bom/4.0.0/jaxb-bom-4.0.0",
|
||||
"path": "org/glassfish/jaxb/jaxb-bom/4.0.1/jaxb-bom-4.0.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "c249a1dfc5c37ce7c23960ea4937731d06050701",
|
||||
"sha256": "0179i75g2fg1xa8m9y95gxvq005lc0q7v2i7q85x1vgsqq1vmgvh"
|
||||
"sha1": "99d85661aef6ac9f6bfb6af0f0ea507d054b91e1",
|
||||
"sha256": "151zbrywjzbnmwqg246iyz0bqnx2hh730hxmig62vh67s2nbw8lm"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8824,16 +8852,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/glassfish/jaxb/jaxb-core/4.0.0/jaxb-core-4.0.0",
|
||||
"path": "org/glassfish/jaxb/jaxb-core/4.0.1/jaxb-core-4.0.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "a2776aadba768ae99d9cb688f0f8a229d8761069",
|
||||
"sha256": "1i2fr7qgj9wi6m0z762z1l6hrrx76zlz705bjg78yikzm1mjwcch"
|
||||
"sha1": "e366262bbe2037088461f748896f6aa4afcfd3c6",
|
||||
"sha256": "14d3d3p0c42qd8jq8mxmpymd17x5zxixhyccwfmxkr24ad9pvj46"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "83ab64d327198b2facd4071415d782ebc69469a1",
|
||||
"sha256": "0fy1iyr000gri5aa8813ryym3mk5j6fykh37y6flwpq2ab54s4f0"
|
||||
"sha1": "b4707bb31dfcf54ae424b930741f0cd62d672af9",
|
||||
"sha256": "19v525w4qb65czx1v31k5lz0yan9vc030h736iqgz59l2048hf3l"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -8866,16 +8894,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/glassfish/jaxb/txw2/4.0.0/txw2-4.0.0",
|
||||
"path": "org/glassfish/jaxb/txw2/4.0.1/txw2-4.0.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "3d7f129889ba97cc55976365c1458703226416a6",
|
||||
"sha256": "0cpknc59szlz7i9ql94xlxgaw4fpr3fpbnbimfc918pny8n28ls1"
|
||||
"sha1": "160273691bf3ffa0745bf86453dd56c62ec23ac2",
|
||||
"sha256": "03zv45jgmppikcqk7gq01pyryzvam3qnllc5q7jjywvnq5mjdvvp"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "afa5e81b5a9a390c98651a3da71c7f4cde14bcf0",
|
||||
"sha256": "1hk3b5w556wzckk05fdbjr03v5swygwyr4ayvf72hx0qclpf869q"
|
||||
"sha1": "797720dfe2e15504f6014fb82eb873051a653c75",
|
||||
"sha256": "1aba3rk9jm66k65vx95a92sdapbsvfbsvii26s8y9rach44p9m7l"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -9792,16 +9820,30 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21/kotlin-stdlib-common-1.6.21",
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-common/1.7.10/kotlin-stdlib-common-1.7.10",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "747a8ea8a8a4328946cf0252c5ceb2aa0ceb054f",
|
||||
"sha256": "18kbabqzyiv5rzcvxzn28wsk6cxnh7aliiayian2sg7xfgp5dhav"
|
||||
"sha1": "38af1ac562fefcc5e920fc7c1290b480251c5163",
|
||||
"sha256": "1sx8w3x3rniwwq6c0g3kgc1mbg2rflq3fsarbpzwv57fi0xwc48h"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "5e5b55c26dbc80372a920aef60eb774b714559b8",
|
||||
"sha256": "0qr34h6pkf6bw6vagc06y78ln6gikj3qq3hrgfai8flzrmcyqfqq"
|
||||
"sha1": "bac80c520d0a9e3f3673bc2658c6ed02ef45a76a",
|
||||
"sha256": "1m4ikzjqdpjvbhl0kjhzz53prr1kqlasslrqqsmqx7v2x7ph5w8r"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-common/1.8.0/kotlin-stdlib-common-1.8.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "943e647c5b6a8edafb7fa14d01d414165eba8c76",
|
||||
"sha256": "11bvfnbvhbri34s30y72h9x4j5idnakl2zalwi32izcdri3fqxd0"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "f7197e7cc76453ac59f8b0f8d5137cc600becd36",
|
||||
"sha256": "1cjc3yy442j939nq1dxkwfncn1vv0d6bvyfya7zc0g30kssr7vvq"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -9889,6 +9931,20 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.8.0/kotlin-stdlib-jdk7-1.8.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "b8a4b9c31ec89be4e5806db4aa92192a9d592bf0",
|
||||
"sha256": "0jhqh08kiahjh5gw3jg6mrqgg88bhdzgbcav8zp9if75d9569afz"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "3c91271347f678c239607abb676d4032a7898427",
|
||||
"sha256": "0rin2rcw1zhnp9df3vn9c1vaqs93wsvsd4hmdkmz5x83k0frv22c"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.2.71/kotlin-stdlib-jdk8-1.2.71",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
@@ -9959,6 +10015,20 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.8.0/kotlin-stdlib-jdk8-1.8.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "fb9dbe3343144298825b8d9f23a51f4af4be6cb0",
|
||||
"sha256": "09pwnlx2yihczjikvmacznmn77d1g8p5hrlqkw1bmiwp3dawgdib"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "ed04f49e186a116753ad70d34f0ac2925d1d8020",
|
||||
"sha256": "0ih9j00wliphn4r8wisqc95y5919fg7xbdxn40crl30v8h22idh5"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jre7/1.2.0/kotlin-stdlib-jre7-1.2.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
@@ -10170,16 +10240,30 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib/1.6.21/kotlin-stdlib-1.6.21",
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib/1.7.10/kotlin-stdlib-1.7.10",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "f44be76009ce4253eaa59b914f4dccc384442016",
|
||||
"sha256": "0d0zmvx7znha69ir50z72n7nzgw4yr6rfzb6mb6kdn0vl1dp4hnf"
|
||||
"sha1": "257059438321a19e567a4593e9fed8a76814c6da",
|
||||
"sha256": "10adfs0syahl7v70l8db7dxbvpf3bx9w745v1q3fwbf05ddczh3c"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "11ef67f1900634fd951bad28c53ec957fabbe5b8",
|
||||
"sha256": "14m428q4m7y8srb7z5m0qfq8ic3f62layqwgn9rpacxvf9k5573k"
|
||||
"sha1": "d2abf9e77736acc4450dc4a3f707fa2c10f5099d",
|
||||
"sha256": "00c9d97y1ab55fi926jx79fbk30xzw0k4wa6cf7kx50a4msgwwg7"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib/1.8.0/kotlin-stdlib-1.8.0",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "bdf2626ad84d8666184ee777e9b1a997c18fd029",
|
||||
"sha256": "0wpq3r6p7mfzka9bq1dj4m30f4z5h3wkpz9hav8kdrd8amjr1b7i"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "1796921c7a3e2e2665a83e6c8d33399336cd39bc",
|
||||
"sha256": "0kk5zkpnyl1hnkjd5dxyg2cfbni0yagla5z2sswry2v4fj3yyyy7"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10240,12 +10324,12 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/junit/junit-bom/5.9.0/junit-bom-5.9.0",
|
||||
"path": "org/junit/junit-bom/5.9.2/junit-bom-5.9.2",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "287a17c5dcfa8c0e07abd27b43d41d521e32fcae",
|
||||
"sha256": "15ajszz9swya920lj7ivj8k2yfcj0ilxlp7c3qcl9pkcczqqfgnq"
|
||||
"sha1": "645a08cbe455cad14d8bfb25a35d7f594c53cafd",
|
||||
"sha256": "01gp6mpz7c4vcyrmm0drb05rvdan82d6qiw6d8rzacaihijpvl1f"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10278,26 +10362,26 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/objenesis/objenesis-parent/3.2/objenesis-parent-3.2",
|
||||
"path": "org/objenesis/objenesis-parent/3.3/objenesis-parent-3.3",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "833ced74e7fd53408a3915080c5e50f2dc90dc35",
|
||||
"sha256": "1xrkvx2k9zhkzcw2d4zlryya0j5adw1jr1p5chwv3vzybh6vln88"
|
||||
"sha1": "60b46fea1dc4cb9c3123f8c366f8b33d0c774fa3",
|
||||
"sha256": "1zz41g0qr0bryyl293a2gnwl6ln37qfa8vd9agzcgqgil953hp1h"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/objenesis/objenesis/3.2/objenesis-3.2",
|
||||
"path": "org/objenesis/objenesis/3.3/objenesis-3.3",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "d6bda29a6a26aa5207ab880a4f09870aff20e3c6",
|
||||
"sha256": "033b2sm4h4v82s7z7pp1ymqlid7nc2wmx8dq8ldp333v8zqss42f"
|
||||
"sha1": "8da1208285232e541d0bbb869bbe66af6ec6abb4",
|
||||
"sha256": "1lsac7xdv93chlz6m7jhrjzvq3qz8xm0dxsfwav4i8394vd4035s"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "7fadf57620c8b8abdf7519533e5527367cb51f09",
|
||||
"sha256": "1wrmbs094mnzds44hi4f5gfprdsyl6ni6100xd9wc0zgbayn1n83"
|
||||
"sha1": "1049c09f1de4331e8193e579448d0916d75b7631",
|
||||
"sha256": "1sxzd7py9f2rx4vldxxbaf7r9c2f8zsx53khbgir2mcs8fqd1pq2"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10343,20 +10427,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/ow2/asm/asm-analysis/9.3/asm-analysis-9.3",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "43ff0af5f6b460fd29abb04686e7ff596c986d5d",
|
||||
"sha256": "1bs2mzpygypcaivf004s40cia1l1jy6gnbr4rl8jldvwg4dqa1hy"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "4b071f211b37c38e0e9f5998550197c8593f6ad8",
|
||||
"sha256": "15clnbb60sj21prlkia8z17v6az9s13gvzig41gw3x1cpf957z9p"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/ow2/asm/asm-commons/5.1/asm-commons-5.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
@@ -10386,16 +10456,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/ow2/asm/asm-commons/9.3/asm-commons-9.3",
|
||||
"path": "org/ow2/asm/asm-commons/9.4/asm-commons-9.4",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "a5d49fdf069b3561fc04cdbe11ba5863f874f9d2",
|
||||
"sha256": "1wz7anp4md0w7z376nv8fx0jbsgzxnwqia919qimygm3aflws4zm"
|
||||
"sha1": "a73e9b6e9061dd1477e0009420785215c476095e",
|
||||
"sha256": "0yaildilrkjwrpf0v2y7h8zk2zvd23r900nwbmm7f4c8ryms4b5l"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "1f2a432d1212f5c352ae607d7b61dcae20c20af5",
|
||||
"sha256": "0fbz5w6iyxk1bgvs9477hvps61jv05m9krdn0v8ylanv693w4ix3"
|
||||
"sha1": "8fc2810ddbcbbec0a8bbccb3f8eda58321839912",
|
||||
"sha256": "0r336bb5caxxrm5mflc9yl4bais2y5nd3xkjjaarhg7kqfg8l4hc"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10520,16 +10590,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/ow2/asm/asm-tree/9.3/asm-tree-9.3",
|
||||
"path": "org/ow2/asm/asm-tree/9.4/asm-tree-9.4",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "e32c87565e1956806ca4465a9f01bbad98bd36f3",
|
||||
"sha256": "1i0j00gpf2l78qshywz2v08vn7wy3ffxc65ygvj8abzv4gjcm6f7"
|
||||
"sha1": "cb6463c845158931c700e51b4922a4a5159299fa",
|
||||
"sha256": "05iw3bjrilkc4crm45wwb1n2s02dqvy84lyf68q3dayqpn9yzsf7"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "78d2ecd61318b5a58cd04fb237636c0e86b77d97",
|
||||
"sha256": "1x5g9ig0vlawybc3cgnjyaa4lih072i442hlippq35pk14k9qqmf"
|
||||
"sha1": "a99175a17d7fdc18cbcbd0e8ea6a5d276844190a",
|
||||
"sha256": "1krabgknafs85zvnqc46m2sbv1jfxypfxxqan8ga4rj5yaf4fbf4"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10604,16 +10674,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/ow2/asm/asm/9.3/asm-9.3",
|
||||
"path": "org/ow2/asm/asm/9.4/asm-9.4",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "617c35341920b1af4ebdf3dd347965fe725b19e0",
|
||||
"sha256": "1q13c68bssn33ad9q87vxhxvyvlg6vx2jyvd2nl87slakzi0gb4f"
|
||||
"sha1": "91bffd75aa63f199ab1a97746ae563d6099890b9",
|
||||
"sha256": "1513k0r5vs96bbdjzz6q6c1xqvj6z87v0fmdc4yg9ldjizj52ds8"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "8e6300ef51c1d801a7ed62d07cd221aca3a90640",
|
||||
"sha256": "1g74d39ng33ga485fgp6bh4ccbif2pbdc4fy30wr9772b6dkcqqj"
|
||||
"sha1": "b4e0e2d2e023aa317b7cfcfc916377ea348e07d1",
|
||||
"sha256": "10gk2l71sfj4d0sgj971abh2d8cl19slay89kfh6bbs5vjry5l1r"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -10628,64 +10698,64 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/ow2/ow2/1.5/ow2-1.5",
|
||||
"path": "org/ow2/ow2/1.5.1/ow2-1.5.1",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "d8edc69335f4d9f95f511716fb689c86fb0ebaae",
|
||||
"sha256": "0fxla3fq7dakwhvgkm42230hz9q79d7bhlcw73k8y2vndq8ip2hg"
|
||||
"sha1": "bda66fa5f1b68fa7d2de3d569bdc8508b2af82d4",
|
||||
"sha256": "01fgb949y6rn7dv1y71r8bx6nk8mfkdxck3bx8yzbr3gxsvxn79j"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/slf4j/jcl-over-slf4j/2.0.0/jcl-over-slf4j-2.0.0",
|
||||
"path": "org/slf4j/jcl-over-slf4j/2.0.6/jcl-over-slf4j-2.0.6",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "1265e0891ef9192370321fdc31093ac3f8f25416",
|
||||
"sha256": "0n158qilhk0dkfdmswb4m6pmv5ak2rpws663bypw6a4sl6crs0ka"
|
||||
"sha1": "c9d9caedcca2a1564e47b55614960958c5f78773",
|
||||
"sha256": "1swgy5hwv54b1i1117shn3wmwba3v78qvy6cnv8v243j7ac6vzqq"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "106e8a608a39344e150c33e86c77b9b934aa5065",
|
||||
"sha256": "0miis9sygaga073h8kyd1mfq9lixarx65pf6n6dc3y40ybzn3kim"
|
||||
"sha1": "839ff57e112f2e28ef372e96d135696a6896b9ad",
|
||||
"sha256": "0s9scdwkxwj3al87ihanj10rscrjh44kligr5asb7qpl28d1xvks"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/slf4j/slf4j-api/2.0.0/slf4j-api-2.0.0",
|
||||
"path": "org/slf4j/slf4j-api/2.0.6/slf4j-api-2.0.6",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "52c80b4691822af828e6c29f1ae5e3cef281661f",
|
||||
"sha256": "0w66wymjwsvilbqxi6v1cddkych0zwd6nd3ny5cnghspc8mpqbs6"
|
||||
"sha1": "2b93d5f66ad2ba259bf4b2c94da39f0d6c544400",
|
||||
"sha256": "0dipzawn8rxikciij2z06c25rb2vdj83s8ga3a7n10r77p2qcklb"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "82b150a36b504a09076b29c0509e31702c9c3999",
|
||||
"sha256": "1acasgpcdkz10px54jpq36247x67jxgmzg2ykka1jkxqj7gyc8x2"
|
||||
"sha1": "88c40d8b4f33326f19a7d3c0aaf2c7e8721d4953",
|
||||
"sha256": "1nkv0z4dpkvp6pr9ph8087z5r691bv95xdv3gnfi6s5j23a94aig"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/slf4j/slf4j-jdk14/2.0.0/slf4j-jdk14-2.0.0",
|
||||
"path": "org/slf4j/slf4j-jdk14/2.0.6/slf4j-jdk14-2.0.6",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "jar",
|
||||
"pom": {
|
||||
"sha1": "39e263798126a4f436d2c038c027206161281a94",
|
||||
"sha256": "03djp0fm3a87v11sfbyr61y5aw2nmk8y200ypvk900457xmfsh3c"
|
||||
"sha1": "96ac9d6ab608e787d54892b35205bc6a560aa007",
|
||||
"sha256": "0gnsyy1n5v8xqdy6a6p1752m5c4afihpw0n36n6aqw01y9l86q1h"
|
||||
},
|
||||
"jar": {
|
||||
"sha1": "2ed46f1cca1c996824f4cae1864d2647c79ac51b",
|
||||
"sha256": "154xs1a5ws86lqbbfc85fxyx8h7mnp1slfqw2bzhfg57ama74ydf"
|
||||
"sha1": "13056cb341f2d8795120f8027766a058da874f85",
|
||||
"sha256": "0jncm8a2ppliqpzkbqm26sn98mwif8c1nligc1zh4jbzr8mxyzhy"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/slf4j/slf4j-parent/2.0.0/slf4j-parent-2.0.0",
|
||||
"path": "org/slf4j/slf4j-parent/2.0.6/slf4j-parent-2.0.6",
|
||||
"host": "https://repo.maven.apache.org/maven2",
|
||||
"type": "pom",
|
||||
"pom": {
|
||||
"sha1": "3258eeb7e4941d30d51cb50d3130edcc485e3995",
|
||||
"sha256": "1dfgibrdb4s1gf6vzhp72hhfz2443m1br268z9qb8z3zsxkjlbd6"
|
||||
"sha1": "0f99f8426c64fc5e0c4b6749245e50484a16c372",
|
||||
"sha256": "091il49sidk0lcmzdy0vl3a4l16kw6x1q0l9vk0hir1ipq66b0hl"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -4,10 +4,13 @@ androidx.annotation:annotation-experimental:1.1.0
|
||||
androidx.annotation:annotation:1.0.0
|
||||
androidx.annotation:annotation:1.1.0
|
||||
androidx.annotation:annotation:1.2.0
|
||||
androidx.annotation:annotation:1.3.0
|
||||
androidx.appcompat:appcompat-resources:1.1.0
|
||||
androidx.appcompat:appcompat-resources:1.2.0
|
||||
androidx.appcompat:appcompat-resources:1.3.1
|
||||
androidx.appcompat:appcompat:1.0.2
|
||||
androidx.appcompat:appcompat:1.1.0
|
||||
androidx.appcompat:appcompat:1.2.0
|
||||
androidx.appcompat:appcompat:1.3.1
|
||||
androidx.arch.core:core-common:2.0.0
|
||||
androidx.arch.core:core-common:2.1.0
|
||||
@@ -310,7 +313,6 @@ com.android.tools:sdk-common:26.2.1
|
||||
com.android.tools:sdk-common:26.3.1
|
||||
com.android.tools:sdk-common:26.5.4
|
||||
com.drewnoakes:metadata-extractor:2.9.1
|
||||
com.eightbitlab:blurview:1.6.6
|
||||
com.facebook.conceal:conceal:1.1.3
|
||||
com.facebook.fbjni:fbjni-java-only:0.0.3
|
||||
com.facebook.flipper:flipper-fresco-plugin:0.54.0
|
||||
@@ -346,6 +348,7 @@ com.facebook.soloader:annotation:0.9.0
|
||||
com.facebook.soloader:nativeloader:0.9.0
|
||||
com.facebook.soloader:soloader:0.9.0
|
||||
com.facebook.yoga:proguard-annotations:1.14.1
|
||||
com.github.Dimezis:BlurView:version-2.0.2
|
||||
com.github.bumptech.glide:annotations:4.12.0
|
||||
com.github.bumptech.glide:compiler:4.12.0
|
||||
com.github.bumptech.glide:disklrucache:4.12.0
|
||||
@@ -512,6 +515,7 @@ org.jetbrains.kotlin:kotlin-stdlib-common:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.31
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.10
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.30
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.20
|
||||
@@ -530,6 +534,7 @@ org.jetbrains.kotlin:kotlin-stdlib:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.50
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.4.31
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.5.10
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.5.30
|
||||
org.jetbrains.kotlin:kotlin-util-io:1.3.50
|
||||
org.jetbrains.kotlin:kotlin-util-io:1.4.31
|
||||
|
||||
@@ -7,6 +7,7 @@ https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.0.1/ann
|
||||
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.0.2/annotation-1.0.2.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.1.0/annotation-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.2.0/annotation-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.3.0/annotation-1.3.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat-resources/1.1.0/appcompat-resources-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat-resources/1.2.0/appcompat-resources-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat-resources/1.3.1/appcompat-resources-1.3.1.pom
|
||||
@@ -282,13 +283,13 @@ https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.3.1/sdk-
|
||||
https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.5.4/sdk-common-26.5.4.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.0.0/material-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/com/google/android/material/material/1.2.0-alpha03/material-1.2.0-alpha03.pom
|
||||
https://jitpack.io/com/github/Dimezis/BlurView/version-2.0.2/BlurView-version-2.0.2.pom
|
||||
https://jitpack.io/com/github/status-im/function/0.0.1/function-0.0.1.pom
|
||||
https://jitpack.io/com/github/status-im/status-keycard-java/android/3.0.4/android-3.0.4.pom
|
||||
https://jitpack.io/com/github/status-im/status-keycard-java/lib/3.0.4/lib-3.0.4.pom
|
||||
https://jitpack.io/com/github/wix-playground/ahbottomnavigation/3.3.0/ahbottomnavigation-3.3.0.pom
|
||||
https://jitpack.io/com/github/wix-playground/reflow-animator/1.0.6/reflow-animator-1.0.6.pom
|
||||
https://jitpack.io/com/github/yalantis/ucrop/2.2.6-native/ucrop-2.2.6-native.pom
|
||||
https://plugins.gradle.org/m2/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/drawee/2.2.0/drawee-2.2.0.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/fbcore/2.2.0/fbcore-2.2.0.pom
|
||||
https://plugins.gradle.org/m2/com/facebook/fresco/fresco/2.2.0/fresco-2.2.0.pom
|
||||
@@ -413,8 +414,8 @@ https://repo.maven.apache.org/maven2/com/github/gundy/semver4j/0.16.4/semver4j-0
|
||||
https://repo.maven.apache.org/maven2/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-parent/3/auto-parent-3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-annotations/1.9/auto-value-annotations-1.9.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-parent/1.9/auto-value-parent-1.9.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-annotations/1.10.1/auto-value-annotations-1.10.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-parent/1.10.1/auto-value-parent-1.10.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value/1.5.2/auto-value-1.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.pom
|
||||
@@ -434,12 +435,12 @@ https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotatio
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.1.2/error_prone_annotations-2.1.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.2.0/error_prone_annotations-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.3.1/error_prone_annotations-2.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.15.0/error_prone_annotations-2.15.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.18.0/error_prone_annotations-2.18.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.0.18/error_prone_parent-2.0.18.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.1.2/error_prone_parent-2.1.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.2.0/error_prone_parent-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.3.1/error_prone_parent-2.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.15.0/error_prone_parent-2.15.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_parent/2.18.0/error_prone_parent-2.18.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/google/1/google-1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava-parent/17.0/guava-parent-17.0.pom
|
||||
@@ -458,7 +459,7 @@ https://repo.maven.apache.org/maven2/com/google/guava/guava/27.0.1-jre/guava-27.
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/guava/31.1-jre/guava-31.1-jre.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/j2objc/j2objc-annotations/2.8/j2objc-annotations-2.8.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/jimfs/jimfs-parent/1.1/jimfs-parent-1.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/jimfs/jimfs/1.1/jimfs-1.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-bom/4.0.0-rc-2/protobuf-bom-4.0.0-rc-2.pom
|
||||
@@ -478,22 +479,23 @@ https://repo.maven.apache.org/maven2/com/parse/bolts/bolts-applinks/1.4.0/bolts-
|
||||
https://repo.maven.apache.org/maven2/com/parse/bolts/bolts-tasks/1.4.0/bolts-tasks-1.4.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/javapoet/1.8.0/javapoet-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/javawriter/2.5.0/javawriter-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp-jvm/5.0.0-alpha.10/okhttp-jvm-5.0.0-alpha.10.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp-jvm/5.0.0-alpha.11/okhttp-jvm-5.0.0-alpha.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp-tls/3.12.12/okhttp-tls-3.12.12.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp-urlconnection/3.12.12/okhttp-urlconnection-3.12.12.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.9.1/okhttp-3.9.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.12.12/okhttp-3.12.12.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/5.0.0-alpha.10/okhttp-5.0.0-alpha.10.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/5.0.0-alpha.11/okhttp-5.0.0-alpha.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.9.1/parent-3.9.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.12.1/parent-3.12.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.12.12/parent-3.12.12.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-jvm/3.2.0/okio-jvm-3.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-jvm/3.3.0/okio-jvm-3.3.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-parent/1.15.0/okio-parent-1.15.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-parent/1.17.4/okio-parent-1.17.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.15.0/okio-1.15.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.17.4/okio-1.17.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/3.2.0/okio-3.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/3.3.0/okio-3.3.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.0/all-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons-runtime/2.21/istack-commons-runtime-2.21.pom
|
||||
@@ -501,12 +503,12 @@ https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons-runtime/4.1.1
|
||||
https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons/2.21/istack-commons-2.21.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/istack/istack-commons/4.1.1/istack-commons-4.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/2.2.11/jaxb-bom-ext-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/4.0.0/jaxb-bom-ext-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/jaxb-bom-ext/4.0.1/jaxb-bom-ext-4.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/2.2.11/jaxb-parent-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/4.0.0/jaxb-parent-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-parent/4.0.1/jaxb-parent-4.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-runtime-parent/2.2.11/jaxb-runtime-parent-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/2.2.11/jaxb-txw-parent-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.0/jaxb-txw-parent-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/bind/mvn/jaxb-txw-parent/4.0.1/jaxb-txw-parent-4.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/FastInfoset/1.2.13/FastInfoset-1.2.13.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/FastInfoset/2.1.0/FastInfoset-2.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/xml/fastinfoset/fastinfoset-project/1.2.13/fastinfoset-project-1.2.13.pom
|
||||
@@ -521,7 +523,7 @@ https://repo.maven.apache.org/maven2/com/tunnelvisionlabs/antlr4/4.5/antlr4-4.5.
|
||||
https://repo.maven.apache.org/maven2/de/undercouch/gradle-download-task/3.4.3/gradle-download-task-3.4.3.pom
|
||||
https://repo.maven.apache.org/maven2/de/undercouch/gradle-download-task/4.0.2/gradle-download-task-4.0.2.pom
|
||||
https://repo.maven.apache.org/maven2/it/unimi/dsi/fastutil/7.2.0/fastutil-7.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/activation/jakarta.activation-api/2.1.0/jakarta.activation-api-2.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/activation/jakarta.activation-api/2.1.1/jakarta.activation-api-2.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api-parent/4.0.0/jakarta.xml.bind-api-parent-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/jakarta/xml/bind/jakarta.xml.bind-api/4.0.0/jakarta.xml.bind-api-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/javax/activation/activation/1.1/activation-1.1.pom
|
||||
@@ -556,12 +558,12 @@ https://repo.maven.apache.org/maven2/net/sf/proguard/proguard-parent/6.0.3/progu
|
||||
https://repo.maven.apache.org/maven2/net/sf/proguard/proguard-parent/6.3.0beta1/proguard-parent-6.3.0beta1.pom
|
||||
https://repo.maven.apache.org/maven2/org/abego/treelayout/org.abego.treelayout.core/1.0.1/org.abego.treelayout.core-1.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/ST4/4.0.8/ST4-4.0.8.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/ST4/4.3.3/ST4-4.3.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/ST4/4.3.4/ST4-4.3.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/antlr4-master/4.5.2-1/antlr4-master-4.5.2-1.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/antlr4-master/4.5.3/antlr4-master-4.5.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/antlr4-master/4.10.1/antlr4-master-4.10.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/antlr4-master/4.11.1/antlr4-master-4.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/antlr4-runtime/4.5.2-1/antlr4-runtime-4.5.2-1.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/antlr4-runtime/4.10.1/antlr4-runtime-4.10.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/antlr4-runtime/4.11.1/antlr4-runtime-4.11.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/antlr4/4.5.3/antlr4-4.5.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/antlr-master/3.3/antlr-master-3.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/antlr/antlr-master/3.5.2/antlr-master-3.5.2.pom
|
||||
@@ -600,20 +602,20 @@ https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.2.6/
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.1.1/httpcomponents-client-4.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.1/httpcomponents-client-4.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.2.6/httpcomponents-client-4.2.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.5.2/httpcomponents-client-4.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.5.3/httpcomponents-client-4.5.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.5.6/httpcomponents-client-4.5.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.5.13/httpcomponents-client-4.5.13.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.5.14/httpcomponents-client-4.5.14.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.1/httpcomponents-core-4.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.2.5/httpcomponents-core-4.2.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.4.5/httpcomponents-core-4.4.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.4.6/httpcomponents-core-4.4.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.4.10/httpcomponents-core-4.4.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.4.15/httpcomponents-core-4.4.15.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-core/4.4.16/httpcomponents-core-4.4.16.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-parent/10/httpcomponents-parent-10.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-parent/11/httpcomponents-parent-11.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.pom
|
||||
@@ -621,7 +623,7 @@ https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.2.5/ht
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.5/httpcore-4.4.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.10/httpcore-4.4.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.15/httpcore-4.4.15.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpmime/4.5.2/httpmime-4.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpmime/4.5.6/httpmime-4.5.6.pom
|
||||
@@ -634,7 +636,7 @@ https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.56/bcprov
|
||||
https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.60/bcprov-jdk15on-1.60.pom
|
||||
https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.70/bcprov-jdk15on-1.70.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.24.0/checker-qual-3.24.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.29.0/checker-qual-3.29.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/codehaus-parent/4/codehaus-parent-4.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.pom
|
||||
@@ -649,21 +651,21 @@ https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/70/mojo-paren
|
||||
https://repo.maven.apache.org/maven2/org/conscrypt/conscrypt-android/2.0.0/conscrypt-android-2.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymockclassextension/3.2/easymockclassextension-3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/3.2/easymock-parent-3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/4.3/easymock-parent-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock/4.3/easymock-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation-project/1.0.0/angus-activation-project-1.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation/1.0.0/angus-activation-1.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/5.1.0/easymock-parent-5.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock/5.1.0/easymock-5.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation-project/2.0.0/angus-activation-project-2.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/angus/angus-activation/2.0.0/angus-activation-2.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/ee4j/project/1.0.7/project-1.0.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.4/ecj-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.6.1/ecj-4.6.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/2.2.11/jaxb-bom-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/4.0.0/jaxb-bom-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-bom/4.0.1/jaxb-bom-4.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-core/2.2.11/jaxb-core-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-core/4.0.0/jaxb-core-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-core/4.0.1/jaxb-core-4.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/jaxb-runtime/2.2.11/jaxb-runtime-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/2.2.11/txw2-2.2.11.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/4.0.0/txw2-4.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/glassfish/jaxb/txw2/4.0.1/txw2-4.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-parent/1.3/hamcrest-parent-1.3.pom
|
||||
@@ -730,18 +732,21 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.10/kotlin-stdlib-common-1.5.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.30/kotlin-stdlib-common-1.5.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.20/kotlin-stdlib-common-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21/kotlin-stdlib-common-1.6.21.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.7.10/kotlin-stdlib-common-1.7.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.8.0/kotlin-stdlib-common-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.20/kotlin-stdlib-jdk7-1.3.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.50/kotlin-stdlib-jdk7-1.3.50.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.4.31/kotlin-stdlib-jdk7-1.4.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.5.30/kotlin-stdlib-jdk7-1.5.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.20/kotlin-stdlib-jdk7-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.8.0/kotlin-stdlib-jdk7-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.2.71/kotlin-stdlib-jdk8-1.2.71.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.20/kotlin-stdlib-jdk8-1.3.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.50/kotlin-stdlib-jdk8-1.3.50.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.30/kotlin-stdlib-jdk8-1.5.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.6.20/kotlin-stdlib-jdk8-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.8.0/kotlin-stdlib-jdk8-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.2.0/kotlin-stdlib-jre7-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre8/1.2.0/kotlin-stdlib-jre8-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.pom
|
||||
@@ -757,23 +762,23 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.4.31/k
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.5.10/kotlin-stdlib-1.5.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.5.30/kotlin-stdlib-1.5.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.20/kotlin-stdlib-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.21/kotlin-stdlib-1.6.21.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.7.10/kotlin-stdlib-1.7.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.8.0/kotlin-stdlib-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.3.50/kotlin-util-io-1.3.50.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.4.31/kotlin-util-io-1.4.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-klib/1.4.31/kotlin-util-klib-1.4.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom
|
||||
https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.9.0/junit-bom-5.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/junit/junit-bom/5.9.2/junit-bom-5.9.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.7.7/stax-ex-1.7.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/2.1.0/stax-ex-2.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.2/objenesis-parent-3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.2/objenesis-3.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/3.3/objenesis-parent-3.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.3/objenesis-3.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/5.1/asm-analysis-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/6.0/asm-analysis-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/9.3/asm-analysis-9.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/5.1/asm-commons-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/6.0/asm-commons-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/9.3/asm-commons-9.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/9.4/asm-commons-9.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-debug-all/6.0_BETA/asm-debug-all-6.0_BETA.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-parent/5.0.1/asm-parent-5.0.1.pom
|
||||
@@ -784,18 +789,18 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm-parent/6.0_BETA/asm-parent-
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/5.1/asm-tree-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/6.0/asm-tree-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/9.3/asm-tree-9.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/9.4/asm-tree-9.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/5.1/asm-util-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/6.0/asm-util-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/5.0.3/asm-5.0.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/5.1/asm-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/6.0/asm-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.3/asm-9.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.4/asm-9.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.5/ow2-1.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/2.0.0/jcl-over-slf4j-2.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/2.0.0/slf4j-api-2.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/2.0.0/slf4j-jdk14-2.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/2.0.0/slf4j-parent-2.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.5.1/ow2-1.5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/2.0.6/jcl-over-slf4j-2.0.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/2.0.6/slf4j-api-2.0.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-jdk14/2.0.6/slf4j-jdk14-2.0.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-parent/2.0.6/slf4j-parent-2.0.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
|
||||
https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"@babel/preset-typescript": "^7.17.12",
|
||||
"@react-native-async-storage/async-storage": "^1.17.9",
|
||||
"@react-native-community/audio-toolkit": "git+https://github.com/tbenr/react-native-audio-toolkit.git#refs/tags/v2.0.3-status-v6",
|
||||
"@react-native-community/blur": "git+https://github.com/Kureev/react-native-blur#refs/tags/v3.6.1",
|
||||
"@react-native-community/blur": "git+https://github.com/status-im/react-native-blur#refs/tags/v4.3.0-status",
|
||||
"@react-native-community/cameraroll": "git+https://github.com/status-im/react-native-cameraroll.git#refs/tags/v4.0.4-status.0",
|
||||
"@react-native-community/clipboard": "^1.2.2",
|
||||
"@react-native-community/hooks": "^2.5.1",
|
||||
|
||||
|
After Width: | Height: | Size: 370 B |
|
After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 472 B |
|
After Width: | Height: | Size: 696 B |
|
After Width: | Height: | Size: 370 B |
|
After Width: | Height: | Size: 455 B |
|
After Width: | Height: | Size: 443 B |
|
After Width: | Height: | Size: 601 B |
@@ -38,7 +38,7 @@
|
||||
{:mobile
|
||||
{:target :react-native
|
||||
:output-dir "app"
|
||||
:init-fn status-im2.setup.core/init
|
||||
:init-fn status-im2.core/init
|
||||
;; When false, the Shadow-CLJS watcher won't automatically refresh
|
||||
;; the target files (a.k.a hot reload). When false, you can manually
|
||||
;; reload by calling `shadow.cljs.devtools.api/watch-compile-all!`.
|
||||
|
||||
@@ -2,39 +2,75 @@ import { useDerivedValue, interpolate } from 'react-native-reanimated';
|
||||
|
||||
// Generic Worklets
|
||||
|
||||
// 1. kebab-case styles are not working for worklets
|
||||
// so we have to convert kebab case styles into camel case styles
|
||||
// 2. remove keys with nil value, else useAnimatedStyle will throw an error
|
||||
// https://github.com/status-im/status-mobile/issues/14756
|
||||
export function applyAnimationsToStyle(animations, style) {
|
||||
return function() {
|
||||
'worklet'
|
||||
|
||||
|
||||
var animatedStyle = {}
|
||||
|
||||
|
||||
// Normal Style
|
||||
for (var key in style) {
|
||||
if (key == "transform") {
|
||||
var transforms = style[key];
|
||||
var filteredTransforms = []
|
||||
|
||||
for (var transform of transforms) {
|
||||
var transformKey = Object.keys(transform)[0];
|
||||
var transformValue = transform[transformKey];
|
||||
if(transformValue !== null) {
|
||||
filteredTransforms.push(
|
||||
{[transformKey.replace(/-./g, x=>x[1].toUpperCase())]: transformValue}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
animatedStyle[key] = filteredTransforms;
|
||||
} else {
|
||||
var value = style[key];
|
||||
if (value !== null) {
|
||||
animatedStyle[key.replace(/-./g, x=>x[1].toUpperCase())] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Animations
|
||||
for (var key in animations) {
|
||||
if (key == "transform") {
|
||||
var transforms = animations[key];
|
||||
var animatedTransforms = []
|
||||
|
||||
|
||||
for (var transform of transforms) {
|
||||
var transformKey = Object.keys(transform)[0];
|
||||
animatedTransforms.push({
|
||||
[transformKey]: transform[transformKey].value
|
||||
})
|
||||
var transformValue = transform[transformKey].value;
|
||||
if (transformValue !== null) {
|
||||
animatedTransforms.push(
|
||||
{[transformKey.replace(/-./g, x=>x[1].toUpperCase())]: transformValue}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
animatedStyle[key] = animatedTransforms;
|
||||
} else {
|
||||
animatedStyle[key] = animations[key].value;
|
||||
var animatedValue = animations[key].value;
|
||||
if (animatedValue !== null) {
|
||||
animatedStyle[key.replace(/-./g, x=>x[1].toUpperCase())] = animatedValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Object.assign(animatedStyle, style);
|
||||
|
||||
return animatedStyle;
|
||||
};
|
||||
};
|
||||
|
||||
export function interpolateValue(sharedValue, inputRange, outputRange) {
|
||||
export function interpolateValue(sharedValue, inputRange, outputRange, extrapolation) {
|
||||
return useDerivedValue(
|
||||
function () {
|
||||
'worklet'
|
||||
return interpolate(sharedValue.value, inputRange, outputRange);
|
||||
return interpolate(sharedValue.value, inputRange, outputRange, extrapolation);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
(defn channel-avatar
|
||||
[{:keys [big? locked? emoji-background-color emoji]}]
|
||||
(let [lock-exists? (some? locked?)
|
||||
(let [lock-exists? locked?
|
||||
dark? (theme/dark?)]
|
||||
[rn/view
|
||||
{:style {:width (if big? 32 24)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
(ns quo2.components.code.snippet
|
||||
(:require ["react-native" :as react-native]
|
||||
[cljs-bean.core :as bean]
|
||||
(:require [cljs-bean.core :as bean]
|
||||
[clojure.string :as string]
|
||||
[oops.core :as oops]
|
||||
[quo2.components.buttons.button :as button]
|
||||
@@ -168,8 +167,8 @@
|
||||
:on-copy-press #(when on-copy-press
|
||||
(on-copy-press children))})
|
||||
;; Default props to adapt Highlighter for react-native.
|
||||
:CodeTag react-native/View
|
||||
:PreTag react-native/View
|
||||
;;:CodeTag react-native/View
|
||||
;;:PreTag react-native/View
|
||||
:show-line-numbers false
|
||||
:style #js {}
|
||||
:custom-style #js {:backgroundColor nil}}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
(ns quo2.components.community.token-gating
|
||||
(:require [quo.react-native :as rn]
|
||||
[quo2.components.avatars.channel-avatar :as channel-avatar]
|
||||
(:require [quo2.components.avatars.channel-avatar :as channel-avatar]
|
||||
[quo2.components.buttons.button :as button]
|
||||
[quo2.components.icon :as icon]
|
||||
[quo2.components.info.information-box :as information-box]
|
||||
@@ -8,7 +7,8 @@
|
||||
[quo2.components.tags.token-tag :as token-tag]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[utils.i18n :as i18n]
|
||||
[react-native.fast-image :as fast-image]))
|
||||
[react-native.fast-image :as fast-image]
|
||||
[react-native.core :as rn]))
|
||||
|
||||
(def ^:private token-tag-horizontal-spacing 7)
|
||||
(def token-tag-vertical-spacing 5)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(ns quo2.components.drawers.--tests--.action-drawers-component-spec
|
||||
(ns quo2.components.drawers.action-drawers.component-spec
|
||||
(:require ["@testing-library/react-native" :as rtl]
|
||||
[quo2.components.drawers.action-drawers :as action-drawer]
|
||||
[quo2.components.drawers.action-drawers.view :as action-drawer]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(defn render-action-drawer
|
||||
@@ -50,4 +50,4 @@
|
||||
:add-divider? true
|
||||
:accessibility-label :first-element}]])
|
||||
(-> (js/expect (rtl/screen.getAllByLabelText "divider"))
|
||||
(.toBeTruthy))))
|
||||
(.toBeTruthy))))
|
||||
@@ -0,0 +1,41 @@
|
||||
(ns quo2.components.drawers.action-drawers.style
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
|
||||
(def divider
|
||||
{:border-top-width 1
|
||||
:border-top-color (colors/theme-colors
|
||||
colors/neutral-10
|
||||
colors/neutral-90)
|
||||
:margin-top 8
|
||||
:margin-bottom 7
|
||||
:align-items :center
|
||||
:flex-direction :row})
|
||||
|
||||
(defn container
|
||||
[sub-label]
|
||||
{:border-radius 12
|
||||
:height (if sub-label 58 50)
|
||||
:margin-horizontal 8})
|
||||
|
||||
(defn row-container
|
||||
[sub-label]
|
||||
{:height (if sub-label 58 50)
|
||||
:margin-horizontal 12
|
||||
:flex-direction :row})
|
||||
|
||||
(def left-icon
|
||||
{:height 20
|
||||
:margin-top :auto
|
||||
:margin-bottom :auto
|
||||
:margin-right 12
|
||||
:width 20})
|
||||
|
||||
(def text-container
|
||||
{:flex 1
|
||||
:justify-content :center})
|
||||
|
||||
(def right-icon
|
||||
{:height 20
|
||||
:margin-top :auto
|
||||
:margin-bottom :auto
|
||||
:width 20})
|
||||
@@ -1,8 +1,9 @@
|
||||
(ns quo2.components.drawers.action-drawers
|
||||
(ns quo2.components.drawers.action-drawers.view
|
||||
(:require [quo2.components.icon :as icon]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]))
|
||||
[react-native.core :as rn]
|
||||
[quo2.components.drawers.action-drawers.style :as style]))
|
||||
|
||||
(defn- get-icon-color
|
||||
[danger?]
|
||||
@@ -12,14 +13,7 @@
|
||||
|
||||
(def divider
|
||||
[rn/view
|
||||
{:style {:border-top-width 1
|
||||
:border-top-color (colors/theme-colors
|
||||
colors/neutral-10
|
||||
colors/neutral-90)
|
||||
:margin-top 8
|
||||
:margin-bottom 7
|
||||
:align-items :center
|
||||
:flex-direction :row}
|
||||
{:style style/divider
|
||||
:accessible true
|
||||
:accessibility-label :divider}])
|
||||
|
||||
@@ -38,32 +32,20 @@
|
||||
(when add-divider? divider)
|
||||
[rn/touchable-highlight
|
||||
{:accessibility-label accessibility-label
|
||||
:style {:border-radius 12
|
||||
:height (if sub-label 58 50)
|
||||
:margin-horizontal 8}
|
||||
:style (style/container sub-label)
|
||||
:underlay-color (colors/theme-colors colors/neutral-5 colors/neutral-90)
|
||||
:on-press on-press}
|
||||
[rn/view
|
||||
{:style
|
||||
{:height (if sub-label 58 50)
|
||||
:margin-horizontal 12
|
||||
:flex-direction :row}}
|
||||
{:style (style/row-container sub-label)}
|
||||
[rn/view
|
||||
{:accessibility-label :left-icon-for-action
|
||||
:accessible true
|
||||
:style
|
||||
{:height 20
|
||||
:margin-top :auto
|
||||
:margin-bottom :auto
|
||||
:margin-right 12
|
||||
:width 20}}
|
||||
:style style/left-icon}
|
||||
[icon/icon icon
|
||||
{:color (get-icon-color danger?)
|
||||
:size 20}]]
|
||||
[rn/view
|
||||
{:style
|
||||
{:flex 1
|
||||
:justify-content :center}}
|
||||
{:style style/text-container}
|
||||
[text/text
|
||||
{:size :paragraph-1
|
||||
:weight :medium
|
||||
@@ -79,11 +61,7 @@
|
||||
sub-label])]
|
||||
(when right-icon
|
||||
[rn/view
|
||||
{:style
|
||||
{:height 20
|
||||
:margin-top :auto
|
||||
:margin-bottom :auto
|
||||
:width 20}
|
||||
{:style style/right-icon
|
||||
:accessible true
|
||||
:accessibility-label :right-icon-for-action}
|
||||
[icon/icon right-icon
|
||||
@@ -1,10 +1,10 @@
|
||||
(ns quo2.components.drawers.permission-context.--tests--.permission-context-component-spec
|
||||
(ns quo2.components.drawers.permission-context.component-spec
|
||||
(:require [quo2.components.drawers.permission-context.view :as permission-context]
|
||||
[react-native.core :as rn]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "permission context"
|
||||
(h/test
|
||||
(h/test "it tests the default render"
|
||||
(h/render [permission-context/view
|
||||
[rn/text
|
||||
{:accessibility-label :accessibility-id}
|
||||
@@ -3,9 +3,13 @@
|
||||
|
||||
(def radius 20)
|
||||
(def container
|
||||
{:padding-top 16
|
||||
{:flex-direction :row
|
||||
:background-color (colors/theme-colors colors/white colors/neutral-90)
|
||||
:height 82
|
||||
:padding-top 16
|
||||
:padding-bottom 48
|
||||
:padding-horizontal 20
|
||||
:justify-content :center
|
||||
:padding-right :auto
|
||||
:shadow-offset {:width 0
|
||||
:height 2}
|
||||
:shadow-radius radius
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
(ns quo2.components.drawers.permission-context.view
|
||||
(:require [react-native.core :as rn]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[quo2.components.drawers.permission-context.style :as style]))
|
||||
|
||||
(defn view
|
||||
[children]
|
||||
[rn/view {:style style/container}
|
||||
[children on-press]
|
||||
[rn/touchable-highlight
|
||||
{:on-press on-press
|
||||
:underlay-color (colors/theme-colors :transparent colors/neutral-95-opa-70)
|
||||
:style style/container}
|
||||
children])
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
[quo2.components.icon :as icons]
|
||||
[quo2.components.markdown.text :as text]
|
||||
[quo2.components.messages.author.style :as style]
|
||||
[react-native.core :as rn]
|
||||
[status-im.utils.utils :as utils]))
|
||||
[react-native.core :as rn]))
|
||||
|
||||
(def middle-dot "·")
|
||||
|
||||
@@ -35,7 +34,7 @@
|
||||
profile-name])])))
|
||||
|
||||
(defn author
|
||||
[{:keys [profile-name nickname chat-key ens-name time-str contact? verified? untrustworthy?]}]
|
||||
[{:keys [profile-name nickname short-chat-key ens-name time-str contact? verified? untrustworthy?]}]
|
||||
[:f>
|
||||
(fn []
|
||||
(let [ens? (-> ens-name string/blank? not)
|
||||
@@ -85,7 +84,7 @@
|
||||
{:monospace true
|
||||
:size :paragraph-2
|
||||
:style style/chat-key-text}
|
||||
(utils/get-shortened-address chat-key)])
|
||||
short-chat-key])
|
||||
(when-not ens?
|
||||
[text/text
|
||||
{:monospace true
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
[quo2.components.icons.icons :as icons]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[react-native.platform :as platform]
|
||||
[react-native.hole-view :as hole-view]
|
||||
[react-native.reanimated :as reanimated]))
|
||||
|
||||
@@ -32,8 +33,10 @@
|
||||
(fn []
|
||||
(let [icon-animated-style (reanimated/apply-animations-to-style
|
||||
{:tint-color icon-color-anim}
|
||||
{:width 24
|
||||
:height 24})
|
||||
{:width 24
|
||||
:height 24
|
||||
:margin-left 33
|
||||
:margin-top 8})
|
||||
background-color (reanimated/use-shared-value "transparent")
|
||||
background-animated-style (reanimated/apply-animations-to-style
|
||||
{:background-color background-color}
|
||||
@@ -47,27 +50,35 @@
|
||||
:on-press-out #(toggle-background-color background-color true pass-through?)
|
||||
:accessibility-label accessibility-label}
|
||||
[reanimated/view {:style background-animated-style}
|
||||
[hole-view/hole-view
|
||||
{:style {:padding-left 33
|
||||
:padding-top 8}
|
||||
:key new-notifications? ;; Key is required to force removal of holes
|
||||
:holes (cond
|
||||
(not new-notifications?) ;; No new notifications, remove holes
|
||||
[]
|
||||
;; In android animations are not working for the animated components which are nested by
|
||||
;; hole-view,
|
||||
;; Interestingly this only happens when hole view and blur view are used together
|
||||
;; Similar behavior is also seen while removing holes, and to fix that we used key and
|
||||
;; force-rendered view
|
||||
;; But we need animations faster for tab clicks, so we can't rely on reagent atoms,
|
||||
;; so for now only using hole view for the ios tab icon notification boundary
|
||||
(if platform/ios?
|
||||
[hole-view/hole-view
|
||||
{:key new-notifications? ;; Key is required to force removal of holes
|
||||
:holes (cond
|
||||
(not new-notifications?) ;; No new notifications, remove holes
|
||||
[]
|
||||
|
||||
(= notification-indicator :unread-dot)
|
||||
[{:x 50 :y 5 :width 10 :height 10 :borderRadius 5}]
|
||||
(= notification-indicator :unread-dot)
|
||||
[{:x 50 :y 5 :width 10 :height 10 :borderRadius 5}]
|
||||
|
||||
:else
|
||||
[{:x 47 :y 1 :width 18 :height 18 :borderRadius 7}])}
|
||||
[reanimated/image
|
||||
{:style icon-animated-style
|
||||
:source (icons/icon-source (keyword (str icon 24)))}]]
|
||||
:else
|
||||
[{:x 47 :y 1 :width 18 :height 18 :borderRadius 7}])}
|
||||
[reanimated/image
|
||||
{:style icon-animated-style
|
||||
:source (icons/icon-source (keyword (str icon 24)))}]]
|
||||
[reanimated/image
|
||||
{:style icon-animated-style
|
||||
:source (icons/icon-source (keyword (str icon 24)))}])
|
||||
(when new-notifications?
|
||||
(if (= notification-indicator :counter)
|
||||
[counter/counter
|
||||
{:outline false
|
||||
:override-text-color colors/white
|
||||
{:override-text-color colors/white
|
||||
:override-bg-color colors/primary-50
|
||||
:style {:position :absolute
|
||||
:left 48
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
(ns quo2.components.record-audio.record-audio.--tests--.record-audio-component-spec
|
||||
(:require [quo2.components.record-audio.record-audio.view :as record-audio]
|
||||
[status-im.audio.core :as audio]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "record audio component"
|
||||
(h/before-each
|
||||
(fn []
|
||||
(h/use-fake-timers)))
|
||||
|
||||
(h/after-each
|
||||
(fn []
|
||||
(h/clear-all-timers)
|
||||
(h/use-real-timers)))
|
||||
|
||||
(h/test "renders record-audio"
|
||||
(h/render [record-audio/record-audio])
|
||||
(-> (h/expect (h/get-by-test-id "record-audio"))
|
||||
(.toBeTruthy)))
|
||||
|
||||
(h/test "record-audio on-start-recording works"
|
||||
(let [event (js/jest.fn)]
|
||||
(h/render [record-audio/record-audio {:on-start-recording event}])
|
||||
(h/fire-event
|
||||
:on-start-should-set-responder
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 70
|
||||
:locationY 70}})
|
||||
(-> (h/expect event)
|
||||
(.toHaveBeenCalledTimes 1))))
|
||||
|
||||
(h/test "record-audio on-reviewing-audio works"
|
||||
(let [event (js/jest.fn)]
|
||||
(h/render [record-audio/record-audio {:on-reviewing-audio event}])
|
||||
(with-redefs [audio/start-recording (fn [_ on-start _]
|
||||
(on-start))]
|
||||
(h/fire-event
|
||||
:on-start-should-set-responder
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 70
|
||||
:locationY 70}})
|
||||
(h/advance-timers-by-time 500)
|
||||
(h/fire-event
|
||||
:on-responder-release
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 70
|
||||
:locationY 70}})
|
||||
(-> (h/expect event)
|
||||
(.toHaveBeenCalledTimes 1)))))
|
||||
|
||||
(h/test "record-audio on-send works after reviewing audio"
|
||||
(let [event (js/jest.fn)]
|
||||
(h/render [record-audio/record-audio {:on-send event}])
|
||||
(with-redefs [audio/start-recording (fn [_ on-start _]
|
||||
(on-start))
|
||||
audio/get-recorder-file-path (fn [] "audio-file-path")]
|
||||
(h/fire-event
|
||||
:on-start-should-set-responder
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 70
|
||||
:locationY 70}})
|
||||
(h/advance-timers-by-time 500)
|
||||
(h/fire-event
|
||||
:on-responder-release
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 70
|
||||
:locationY 70}})
|
||||
(h/fire-event
|
||||
:on-responder-release
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 80
|
||||
:locationY 80}})
|
||||
(-> (js/expect event)
|
||||
(.toHaveBeenCalledTimes 1))
|
||||
(-> (js/expect event)
|
||||
(.toHaveBeenCalledWith "audio-file-path")))))
|
||||
|
||||
(h/test "record-audio on-send works after sliding to the send button"
|
||||
(let [event (js/jest.fn)]
|
||||
(h/render [record-audio/record-audio {:on-send event}])
|
||||
(with-redefs [audio/start-recording (fn [_ on-start _]
|
||||
(on-start))
|
||||
audio/stop-recording (fn [_ on-stop _]
|
||||
(on-stop))
|
||||
audio/get-recorder-file-path (fn [] "audio-file-path")]
|
||||
(h/fire-event
|
||||
:on-start-should-set-responder
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 70
|
||||
:locationY 70}})
|
||||
(h/advance-timers-by-time 500)
|
||||
(h/fire-event
|
||||
:on-responder-move
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 80
|
||||
:locationY -30
|
||||
:pageX 80
|
||||
:pageY -30}})
|
||||
(h/fire-event
|
||||
:on-responder-release
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 40
|
||||
:locationY 80}})
|
||||
(-> (js/expect event)
|
||||
(.toHaveBeenCalledTimes 1))
|
||||
(-> (js/expect event)
|
||||
(.toHaveBeenCalledWith "audio-file-path")))))
|
||||
|
||||
(h/test "record-audio on-cancel works after reviewing audio"
|
||||
(let [event (js/jest.fn)]
|
||||
(h/render [record-audio/record-audio {:on-cancel event}])
|
||||
(with-redefs [audio/start-recording (fn [_ on-start _]
|
||||
(on-start))]
|
||||
(h/fire-event
|
||||
:on-start-should-set-responder
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 70
|
||||
:locationY 70}})
|
||||
(h/advance-timers-by-time 500)
|
||||
(h/fire-event
|
||||
:on-responder-release
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 70
|
||||
:locationY 70}})
|
||||
(h/fire-event
|
||||
:on-responder-release
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 40
|
||||
:locationY 80}})
|
||||
(-> (js/expect event)
|
||||
(.toHaveBeenCalledTimes 1)))))
|
||||
|
||||
(h/test "cord-audio on-cancel works after sliding to the cancel button"
|
||||
(let [event (js/jest.fn)]
|
||||
(h/render [record-audio/record-audio {:on-cancel event}])
|
||||
(with-redefs [audio/start-recording (fn [_ on-start _]
|
||||
(on-start))
|
||||
audio/stop-recording (fn [_ on-stop _]
|
||||
(on-stop))]
|
||||
(h/fire-event
|
||||
:on-start-should-set-responder
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX 70
|
||||
:locationY 70}})
|
||||
(h/advance-timers-by-time 500)
|
||||
(h/fire-event
|
||||
:on-responder-move
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX -30
|
||||
:locationY 80
|
||||
:pageX -30
|
||||
:pageY 80}})
|
||||
(h/fire-event
|
||||
:on-responder-release
|
||||
(h/get-by-test-id "record-audio")
|
||||
{:nativeEvent {:locationX -10
|
||||
:locationY 70}})
|
||||
(-> (js/expect event)
|
||||
(.toHaveBeenCalledTimes 1))))))
|
||||
@@ -0,0 +1,88 @@
|
||||
(ns quo2.components.record-audio.record-audio.buttons.delete-button
|
||||
(:require [quo2.components.icon :as icons]
|
||||
[quo2.components.record-audio.record-audio.style :as style]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[react-native.core :refer [use-effect]]
|
||||
[quo2.components.record-audio.record-audio.helpers :refer
|
||||
[animate-linear-with-delay
|
||||
animate-easing-with-delay
|
||||
animate-linear
|
||||
set-value]]))
|
||||
|
||||
(defn delete-button
|
||||
[recording? ready-to-delete? reviewing-audio?]
|
||||
[:f>
|
||||
(fn []
|
||||
(let [opacity (reanimated/use-shared-value 0)
|
||||
translate-x (reanimated/use-shared-value 20)
|
||||
scale (reanimated/use-shared-value 1)
|
||||
connector-opacity (reanimated/use-shared-value 0)
|
||||
connector-width (reanimated/use-shared-value 24)
|
||||
connector-height (reanimated/use-shared-value 12)
|
||||
border-radius-first-half (reanimated/use-shared-value 8)
|
||||
border-radius-second-half (reanimated/use-shared-value 8)
|
||||
start-x-animation (fn []
|
||||
(animate-linear-with-delay translate-x 12 50 133.33)
|
||||
(animate-easing-with-delay connector-opacity 1 0 93.33)
|
||||
(animate-easing-with-delay connector-width 56 83.33 80)
|
||||
(animate-easing-with-delay connector-height 56 83.33 80)
|
||||
(animate-easing-with-delay border-radius-first-half 28 83.33 80)
|
||||
(animate-easing-with-delay border-radius-second-half 28 83.33 80))
|
||||
reset-x-animation (fn []
|
||||
(animate-linear translate-x 0 100)
|
||||
(set-value connector-opacity 0)
|
||||
(set-value connector-width 24)
|
||||
(set-value connector-height 12)
|
||||
(set-value border-radius-first-half 8)
|
||||
(set-value border-radius-second-half 16))
|
||||
fade-in-animation (fn []
|
||||
(animate-linear translate-x 0 200)
|
||||
(animate-linear opacity 1 200))
|
||||
fade-out-animation (fn []
|
||||
(animate-linear
|
||||
translate-x
|
||||
(if @reviewing-audio? 35 20)
|
||||
200)
|
||||
(if @reviewing-audio?
|
||||
(animate-linear scale 0.75 200)
|
||||
(animate-linear opacity 0 200))
|
||||
(set-value connector-opacity 0)
|
||||
(set-value connector-width 24)
|
||||
(set-value connector-height 12)
|
||||
(set-value border-radius-first-half 8)
|
||||
(set-value border-radius-second-half 16))
|
||||
fade-out-reset-animation (fn []
|
||||
(animate-linear opacity 0 200)
|
||||
(animate-linear-with-delay translate-x 20 0 200)
|
||||
(animate-linear-with-delay scale 1 0 200))]
|
||||
(use-effect (fn []
|
||||
(if @recording?
|
||||
(fade-in-animation)
|
||||
(fade-out-animation)))
|
||||
[@recording?])
|
||||
(use-effect (fn []
|
||||
(when-not @reviewing-audio?
|
||||
(fade-out-reset-animation)))
|
||||
[@reviewing-audio?])
|
||||
(use-effect (fn []
|
||||
(cond
|
||||
@ready-to-delete?
|
||||
(start-x-animation)
|
||||
@recording?
|
||||
(reset-x-animation)))
|
||||
[@ready-to-delete?])
|
||||
[:<>
|
||||
[reanimated/view {:style (style/delete-button-container opacity)}
|
||||
[reanimated/view
|
||||
{:style (style/delete-button-connector connector-opacity
|
||||
connector-width
|
||||
connector-height
|
||||
border-radius-first-half
|
||||
border-radius-second-half)}]]
|
||||
[reanimated/view
|
||||
{:style (style/delete-button scale translate-x opacity)
|
||||
:pointer-events :none}
|
||||
[icons/icon :i/delete
|
||||
{:color colors/white
|
||||
:size 20}]]]))])
|
||||
@@ -0,0 +1,85 @@
|
||||
(ns quo2.components.record-audio.record-audio.buttons.lock-button
|
||||
(:require [quo2.components.icon :as icons]
|
||||
[quo2.components.record-audio.record-audio.style :as style]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[react-native.core :refer [use-effect]]
|
||||
[quo2.components.record-audio.record-audio.helpers :refer
|
||||
[animate-linear-with-delay
|
||||
animate-easing-with-delay
|
||||
animate-linear
|
||||
set-value]]))
|
||||
|
||||
(defn lock-button
|
||||
[recording? ready-to-lock? locked?]
|
||||
[:f>
|
||||
(fn []
|
||||
(let [translate-x-y (reanimated/use-shared-value 20)
|
||||
opacity (reanimated/use-shared-value 0)
|
||||
connector-opacity (reanimated/use-shared-value 0)
|
||||
width (reanimated/use-shared-value 24)
|
||||
height (reanimated/use-shared-value 12)
|
||||
border-radius-first-half (reanimated/use-shared-value 8)
|
||||
border-radius-second-half (reanimated/use-shared-value 8)
|
||||
start-x-y-animation (fn []
|
||||
(animate-linear-with-delay translate-x-y 8 50 116.66)
|
||||
(animate-easing-with-delay connector-opacity 1 0 80)
|
||||
(animate-easing-with-delay width 56 83.33 63.33)
|
||||
(animate-easing-with-delay height 56 83.33 63.33)
|
||||
(animate-easing-with-delay border-radius-first-half
|
||||
28
|
||||
83.33
|
||||
63.33)
|
||||
(animate-easing-with-delay border-radius-second-half
|
||||
28
|
||||
83.33
|
||||
63.33))
|
||||
reset-x-y-animation (fn []
|
||||
(animate-linear translate-x-y 0 100)
|
||||
(set-value connector-opacity 0)
|
||||
(set-value width 24)
|
||||
(set-value height 12)
|
||||
(set-value border-radius-first-half 8)
|
||||
(set-value border-radius-second-half 16))
|
||||
fade-in-animation (fn []
|
||||
(animate-linear translate-x-y 0 220)
|
||||
(animate-linear opacity 1 220))
|
||||
fade-out-animation (fn []
|
||||
(animate-linear translate-x-y 20 200)
|
||||
(animate-linear opacity 0 200)
|
||||
(set-value connector-opacity 0)
|
||||
(set-value width 24)
|
||||
(set-value height 12)
|
||||
(set-value border-radius-first-half 8)
|
||||
(set-value border-radius-second-half 16))]
|
||||
(use-effect (fn []
|
||||
(if @recording?
|
||||
(fade-in-animation)
|
||||
(fade-out-animation)))
|
||||
[@recording?])
|
||||
(use-effect (fn []
|
||||
(cond
|
||||
@ready-to-lock?
|
||||
(start-x-y-animation)
|
||||
(and @recording? (not @locked?))
|
||||
(reset-x-y-animation)))
|
||||
[@ready-to-lock?])
|
||||
(use-effect (fn []
|
||||
(if @locked?
|
||||
(fade-out-animation)
|
||||
(reset-x-y-animation)))
|
||||
[@locked?])
|
||||
[:<>
|
||||
[reanimated/view {:style (style/lock-button-container opacity)}
|
||||
[reanimated/view
|
||||
{:style (style/lock-button-connector connector-opacity
|
||||
width
|
||||
height
|
||||
border-radius-first-half
|
||||
border-radius-second-half)}]]
|
||||
[reanimated/view
|
||||
{:style (style/lock-button translate-x-y opacity)
|
||||
:pointer-events :none}
|
||||
[icons/icon (if @ready-to-lock? :i/locked :i/unlocked)
|
||||
{:color (colors/theme-colors colors/black colors/white)
|
||||
:size 20}]]]))])
|
||||
@@ -0,0 +1,28 @@
|
||||
(ns quo2.components.record-audio.record-audio.buttons.record-button
|
||||
(:require [quo2.components.icon :as icons]
|
||||
[quo2.components.record-audio.record-audio.style :as style]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn :refer [use-effect]]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[quo2.components.buttons.button :as button]
|
||||
[quo2.components.record-audio.record-audio.helpers :refer [set-value]]))
|
||||
|
||||
(defn record-button
|
||||
[recording? reviewing-audio?]
|
||||
[:f>
|
||||
(fn []
|
||||
(let [opacity (reanimated/use-shared-value 1)
|
||||
show-animation #(set-value opacity 1)
|
||||
hide-animation #(set-value opacity 0)]
|
||||
(use-effect (fn []
|
||||
(if (or @recording? @reviewing-audio?)
|
||||
(hide-animation)
|
||||
(show-animation)))
|
||||
[@recording? @reviewing-audio?])
|
||||
[reanimated/view {:style (style/record-button-container opacity)}
|
||||
[button/button
|
||||
{:type :outline
|
||||
:size 32
|
||||
:width 32
|
||||
:accessibility-label :mic-button}
|
||||
[icons/icon :i/audio {:color (colors/theme-colors colors/neutral-100 colors/white)}]]]))])
|
||||
@@ -0,0 +1,212 @@
|
||||
(ns quo2.components.record-audio.record-audio.buttons.record-button-big
|
||||
(:require [quo.react :refer [memo]]
|
||||
[quo2.components.icon :as icons]
|
||||
[quo2.components.record-audio.record-audio.style :as style]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn :refer [use-effect]]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[status-im.audio.core :as audio]
|
||||
[taoensso.timbre :as log]
|
||||
[cljs-bean.core :as bean]
|
||||
[reagent.core :as reagent]
|
||||
[quo2.components.record-audio.record-audio.helpers :refer
|
||||
[animate-linear
|
||||
animate-linear-with-delay
|
||||
animate-linear-with-delay-loop
|
||||
animate-easing
|
||||
set-value]]))
|
||||
|
||||
(def ^:private scale-to-each 1.8)
|
||||
(def ^:private scale-to-total 2.6)
|
||||
(def ^:private scale-padding 0.16)
|
||||
(def ^:private opacity-from-lock 1)
|
||||
(def ^:private opacity-from-default 0.5)
|
||||
(def ^:private signal-anim-duration 3900)
|
||||
(def ^:private signal-anim-duration-2 1950)
|
||||
|
||||
(def ^:private record-audio-worklets (js/require "../src/js/record_audio_worklets.js"))
|
||||
|
||||
(defn- ring-scale
|
||||
[scale substract]
|
||||
(.ringScale ^js record-audio-worklets
|
||||
scale
|
||||
substract))
|
||||
|
||||
(def ^:private animated-ring
|
||||
(reagent/adapt-react-class
|
||||
(memo
|
||||
(fn [props]
|
||||
(let [{:keys [scale opacity color]} (bean/bean props)]
|
||||
(reagent/as-element
|
||||
[reanimated/view {:style (style/animated-circle scale opacity color)}]))))))
|
||||
|
||||
(defn record-button-big
|
||||
[recording? ready-to-send? ready-to-lock? ready-to-delete? record-button-is-animating?
|
||||
record-button-at-initial-position? locked? reviewing-audio? recording-timer recording-length-ms
|
||||
clear-timeout touch-active? recorder-ref reload-recorder-fn idle? on-send on-cancel]
|
||||
[:f>
|
||||
(fn []
|
||||
(let [scale (reanimated/use-shared-value 1)
|
||||
opacity (reanimated/use-shared-value 0)
|
||||
opacity-from (if @ready-to-lock? opacity-from-lock opacity-from-default)
|
||||
animations (map
|
||||
(fn [index]
|
||||
(let [ring-scale (ring-scale scale (* scale-padding index))]
|
||||
{:scale ring-scale
|
||||
:opacity (reanimated/interpolate ring-scale
|
||||
[1 scale-to-each]
|
||||
[opacity-from 0])}))
|
||||
(range 0 5))
|
||||
rings-color (cond
|
||||
@ready-to-lock? (colors/theme-colors colors/neutral-80-opa-5-opaque
|
||||
colors/neutral-80)
|
||||
@ready-to-delete? colors/danger-50
|
||||
:else colors/primary-50)
|
||||
translate-y (reanimated/use-shared-value 0)
|
||||
translate-x (reanimated/use-shared-value 0)
|
||||
button-color colors/primary-50
|
||||
icon-color (if (and (not (colors/dark?)) @ready-to-lock?) colors/black colors/white)
|
||||
icon-opacity (reanimated/use-shared-value 1)
|
||||
red-overlay-opacity (reanimated/use-shared-value 0)
|
||||
gray-overlay-opacity (reanimated/use-shared-value 0)
|
||||
complete-animation (fn []
|
||||
(cond
|
||||
(and @ready-to-lock? (not @record-button-is-animating?))
|
||||
(do
|
||||
(reset! locked? true)
|
||||
(reset! ready-to-lock? false))
|
||||
(and (not @locked?) (not @reviewing-audio?))
|
||||
(audio/stop-recording
|
||||
@recorder-ref
|
||||
(fn []
|
||||
(cond
|
||||
@ready-to-send?
|
||||
(when on-send
|
||||
(on-send (audio/get-recorder-file-path @recorder-ref)))
|
||||
@ready-to-delete?
|
||||
(when on-cancel
|
||||
(on-cancel)))
|
||||
(reload-recorder-fn)
|
||||
(reset! recording? false)
|
||||
(reset! ready-to-send? false)
|
||||
(reset! ready-to-delete? false)
|
||||
(reset! ready-to-lock? false)
|
||||
(reset! idle? true)
|
||||
(js/setTimeout #(reset! idle? false) 1000)
|
||||
(js/clearInterval @recording-timer)
|
||||
(reset! recording-length-ms 0)
|
||||
(log/debug "[record-audio] stop recording - success"))
|
||||
#(log/error "[record-audio] stop recording - error: " %))))
|
||||
start-animation (fn []
|
||||
(set-value opacity 1)
|
||||
(animate-linear scale 2.6 signal-anim-duration)
|
||||
;; TODO: Research if we can implement this with withSequence method
|
||||
;; from Reanimated 2
|
||||
;; GitHub issue [#14561]:
|
||||
;; https://github.com/status-im/status-mobile/issues/14561
|
||||
(reset! clear-timeout
|
||||
(js/setTimeout
|
||||
(fn []
|
||||
(set-value scale scale-to-each)
|
||||
(animate-linear-with-delay-loop scale
|
||||
scale-to-total
|
||||
signal-anim-duration-2
|
||||
0))
|
||||
signal-anim-duration)))
|
||||
stop-animation (fn []
|
||||
(set-value opacity 0)
|
||||
(reanimated/cancel-animation scale)
|
||||
(set-value scale 1)
|
||||
(when @clear-timeout (js/clearTimeout @clear-timeout)))
|
||||
start-y-animation (fn []
|
||||
(reset! record-button-at-initial-position? false)
|
||||
(reset! record-button-is-animating? true)
|
||||
(animate-easing translate-y -64 250)
|
||||
(animate-linear-with-delay icon-opacity 0 33.33 76.66)
|
||||
(js/setTimeout (fn []
|
||||
(reset! record-button-is-animating? false)
|
||||
(when-not @touch-active? (complete-animation)))
|
||||
250))
|
||||
reset-y-animation (fn []
|
||||
(animate-easing translate-y 0 300)
|
||||
(animate-linear icon-opacity 1 500)
|
||||
(js/setTimeout (fn []
|
||||
(reset! record-button-at-initial-position? true))
|
||||
500))
|
||||
start-x-animation (fn []
|
||||
(reset! record-button-at-initial-position? false)
|
||||
(reset! record-button-is-animating? true)
|
||||
(animate-easing translate-x -64 250)
|
||||
(animate-linear-with-delay icon-opacity 0 33.33 76.66)
|
||||
(animate-linear red-overlay-opacity 1 33.33)
|
||||
(js/setTimeout (fn []
|
||||
(reset! record-button-is-animating? false)
|
||||
(when-not @touch-active? (complete-animation)))
|
||||
250))
|
||||
reset-x-animation (fn []
|
||||
(animate-easing translate-x 0 300)
|
||||
(animate-linear icon-opacity 1 500)
|
||||
(animate-linear red-overlay-opacity 0 100)
|
||||
(js/setTimeout (fn []
|
||||
(reset! record-button-at-initial-position? true))
|
||||
500))
|
||||
start-x-y-animation (fn []
|
||||
(reset! record-button-at-initial-position? false)
|
||||
(reset! record-button-is-animating? true)
|
||||
(animate-easing translate-y -44 200)
|
||||
(animate-easing translate-x -44 200)
|
||||
(animate-linear-with-delay icon-opacity 0 33.33 33.33)
|
||||
(animate-linear gray-overlay-opacity 1 33.33)
|
||||
(js/setTimeout (fn []
|
||||
(reset! record-button-is-animating? false)
|
||||
(when-not @touch-active? (complete-animation)))
|
||||
200))
|
||||
reset-x-y-animation (fn []
|
||||
(animate-easing translate-y 0 300)
|
||||
(animate-easing translate-x 0 300)
|
||||
(animate-linear icon-opacity 1 500)
|
||||
(animate-linear gray-overlay-opacity 0 800)
|
||||
(js/setTimeout (fn []
|
||||
(reset! record-button-at-initial-position? true))
|
||||
800))]
|
||||
(use-effect (fn []
|
||||
(cond
|
||||
@recording?
|
||||
(start-animation)
|
||||
(not @ready-to-lock?)
|
||||
(stop-animation)))
|
||||
[@recording?])
|
||||
(use-effect (fn []
|
||||
(if @ready-to-lock?
|
||||
(start-x-y-animation)
|
||||
(reset-x-y-animation)))
|
||||
[@ready-to-lock?])
|
||||
(use-effect (fn []
|
||||
(if @ready-to-send?
|
||||
(start-y-animation)
|
||||
(reset-y-animation)))
|
||||
[@ready-to-send?])
|
||||
(use-effect (fn []
|
||||
(if @ready-to-delete?
|
||||
(start-x-animation)
|
||||
(reset-x-animation)))
|
||||
[@ready-to-delete?])
|
||||
[reanimated/view
|
||||
{:style (style/record-button-big-container translate-x translate-y opacity)
|
||||
:pointer-events :none}
|
||||
[:<>
|
||||
(map-indexed
|
||||
(fn [id animation]
|
||||
^{:key id}
|
||||
[animated-ring
|
||||
{:scale (:scale animation)
|
||||
:opacity (:opacity animation)
|
||||
:color rings-color}])
|
||||
animations)]
|
||||
[rn/view {:style (style/record-button-big-body button-color)}
|
||||
[reanimated/view {:style (style/record-button-big-red-overlay red-overlay-opacity)}]
|
||||
[reanimated/view {:style (style/record-button-big-gray-overlay gray-overlay-opacity)}]
|
||||
[reanimated/view {:style (style/record-button-big-icon-container icon-opacity)}
|
||||
(if @locked?
|
||||
[rn/view {:style style/stop-icon}]
|
||||
[icons/icon :i/audio {:color icon-color}])]]]))])
|
||||
@@ -0,0 +1,90 @@
|
||||
(ns quo2.components.record-audio.record-audio.buttons.send-button
|
||||
(:require [quo2.components.icon :as icons]
|
||||
[quo2.components.record-audio.record-audio.style :as style]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[react-native.core :refer [use-effect]]
|
||||
[quo2.components.record-audio.record-audio.helpers :refer
|
||||
[animate-linear
|
||||
animate-linear-with-delay
|
||||
animate-easing-with-delay
|
||||
set-value]]))
|
||||
|
||||
(defn send-button
|
||||
[recording? ready-to-send? reviewing-audio?]
|
||||
[:f>
|
||||
(fn []
|
||||
(let [opacity (reanimated/use-shared-value 0)
|
||||
translate-y (reanimated/use-shared-value 20)
|
||||
connector-opacity (reanimated/use-shared-value 0)
|
||||
width (reanimated/use-shared-value 12)
|
||||
height (reanimated/use-shared-value 24)
|
||||
border-radius-first-half (reanimated/use-shared-value 16)
|
||||
border-radius-second-half (reanimated/use-shared-value 8)
|
||||
start-y-animation (fn []
|
||||
(animate-linear-with-delay translate-y 12 50 133.33)
|
||||
(animate-easing-with-delay connector-opacity 1 0 93.33)
|
||||
(animate-easing-with-delay width 56 83.33 80)
|
||||
(animate-easing-with-delay height 56 83.33 80)
|
||||
(animate-easing-with-delay border-radius-first-half 28 83.33 80)
|
||||
(animate-easing-with-delay border-radius-second-half 28 83.33 80))
|
||||
reset-y-animation (fn []
|
||||
(animate-linear translate-y 0 100)
|
||||
(set-value connector-opacity 0)
|
||||
(set-value width 12)
|
||||
(set-value height 24)
|
||||
(set-value border-radius-first-half 16)
|
||||
(set-value border-radius-second-half 8))
|
||||
fade-in-animation (fn []
|
||||
(animate-linear translate-y 0 200)
|
||||
(animate-linear opacity 1 200))
|
||||
fade-out-animation (fn []
|
||||
(animate-linear
|
||||
translate-y
|
||||
(if @reviewing-audio? 76 20)
|
||||
200)
|
||||
(when-not @reviewing-audio?
|
||||
(animate-linear opacity 0 200))
|
||||
(set-value connector-opacity 0)
|
||||
(set-value width 24)
|
||||
(set-value height 12)
|
||||
(set-value border-radius-first-half 8)
|
||||
(set-value border-radius-second-half 16))
|
||||
fade-out-reset-animation (fn []
|
||||
(animate-linear opacity 0 200)
|
||||
(animate-linear-with-delay translate-y 20 0 200)
|
||||
(set-value connector-opacity 0)
|
||||
(set-value width 24)
|
||||
(set-value height 12)
|
||||
(set-value border-radius-first-half 8)
|
||||
(set-value border-radius-second-half 16))]
|
||||
(use-effect (fn []
|
||||
(if @recording?
|
||||
(fade-in-animation)
|
||||
(fade-out-animation)))
|
||||
[@recording?])
|
||||
(use-effect (fn []
|
||||
(when-not @reviewing-audio?
|
||||
(fade-out-reset-animation)))
|
||||
[@reviewing-audio?])
|
||||
(use-effect (fn []
|
||||
(cond
|
||||
@ready-to-send?
|
||||
(start-y-animation)
|
||||
@recording? (reset-y-animation)))
|
||||
[@ready-to-send?])
|
||||
[:<>
|
||||
[reanimated/view {:style (style/send-button-container opacity)}
|
||||
[reanimated/view
|
||||
{:style (style/send-button-connector connector-opacity
|
||||
width
|
||||
height
|
||||
border-radius-first-half
|
||||
border-radius-second-half)}]]
|
||||
[reanimated/view
|
||||
{:style (style/send-button translate-y opacity)
|
||||
:pointer-events :none}
|
||||
[icons/icon :i/arrow-up
|
||||
{:color colors/white
|
||||
:size 20
|
||||
:container-style style/send-icon-container}]]]))])
|
||||
@@ -0,0 +1,50 @@
|
||||
(ns quo2.components.record-audio.record-audio.helpers
|
||||
(:require [react-native.reanimated :as reanimated]))
|
||||
|
||||
(defn animate-linear
|
||||
[shared-value value duration]
|
||||
(reanimated/animate-shared-value-with-timing
|
||||
shared-value
|
||||
value
|
||||
duration
|
||||
:linear))
|
||||
|
||||
(defn animate-linear-with-delay
|
||||
[shared-value value duration delay]
|
||||
(reanimated/animate-shared-value-with-delay
|
||||
shared-value
|
||||
value
|
||||
duration
|
||||
:linear
|
||||
delay))
|
||||
|
||||
(defn animate-linear-with-delay-loop
|
||||
[shared-value value duration delay]
|
||||
(reanimated/animate-shared-value-with-delay-repeat
|
||||
shared-value
|
||||
value
|
||||
duration
|
||||
:linear
|
||||
delay
|
||||
-1))
|
||||
|
||||
(defn animate-easing
|
||||
[shared-value value duration]
|
||||
(reanimated/animate-shared-value-with-timing
|
||||
shared-value
|
||||
value
|
||||
duration
|
||||
:easing1))
|
||||
|
||||
(defn animate-easing-with-delay
|
||||
[shared-value value duration delay]
|
||||
(reanimated/animate-shared-value-with-delay
|
||||
shared-value
|
||||
value
|
||||
duration
|
||||
:easing1
|
||||
delay))
|
||||
|
||||
(defn set-value
|
||||
[shared-value value]
|
||||
(reanimated/set-shared-value shared-value value))
|
||||
@@ -199,9 +199,10 @@
|
||||
:z-index 0}))
|
||||
|
||||
(defn delete-button
|
||||
[translate-x opacity]
|
||||
[scale translate-x opacity]
|
||||
(reanimated/apply-animations-to-style
|
||||
{:transform [{:translateX translate-x}]
|
||||
{:transform [{:translateX translate-x}
|
||||
{:scale scale}]
|
||||
:opacity opacity}
|
||||
{:width 32
|
||||
:height 32
|
||||
@@ -221,8 +222,66 @@
|
||||
{:margin-bottom 32
|
||||
:margin-right 32}))
|
||||
|
||||
(def input-container
|
||||
(def button-container
|
||||
{:width 140
|
||||
:height 140
|
||||
:align-items :flex-end
|
||||
:justify-content :flex-end})
|
||||
:justify-content :flex-end
|
||||
:position :absolute
|
||||
:right -10})
|
||||
|
||||
(def bar-container
|
||||
{:flex 1
|
||||
:height 128})
|
||||
|
||||
(defn recording-bar-container
|
||||
[]
|
||||
{:height 4
|
||||
:border-radius 2
|
||||
:background-color (colors/theme-colors colors/neutral-20 colors/neutral-80)
|
||||
:overflow :hidden
|
||||
:position :absolute
|
||||
:left 80
|
||||
:right 148
|
||||
:bottom 34})
|
||||
|
||||
(defn recording-bar
|
||||
[fill-percentage ready-to-delete?]
|
||||
{:width (str fill-percentage "%")
|
||||
:height 4
|
||||
:border-radius 2
|
||||
:background-color (if ready-to-delete?
|
||||
(colors/theme-colors colors/danger-50 colors/danger-60)
|
||||
(colors/theme-colors colors/primary-50 colors/primary-60))})
|
||||
|
||||
(defn timer-container
|
||||
[reviewing-audio?]
|
||||
{:position :absolute
|
||||
:left (if reviewing-audio? 67 20)
|
||||
:bottom 28.5
|
||||
:flex-direction :row
|
||||
:align-items :center})
|
||||
|
||||
(defn timer-circle
|
||||
[]
|
||||
{:width 8
|
||||
:height 8
|
||||
:border-radius 4
|
||||
:margin-right 6
|
||||
:background-color (colors/theme-colors colors/danger-50 colors/danger-60)})
|
||||
|
||||
(defn timer-text
|
||||
[]
|
||||
{:color (colors/theme-colors colors/danger-50 colors/danger-60)})
|
||||
|
||||
(defn play-button
|
||||
[]
|
||||
{:position :absolute
|
||||
:bottom 20
|
||||
:left 20
|
||||
:width 32
|
||||
:height 32
|
||||
:border-radius 16
|
||||
:align-items :center
|
||||
:justify-content :center
|
||||
:background-color (colors/theme-colors colors/neutral-10 colors/neutral-90)})
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
(ns quo2.components.record-audio.soundtrack.--tests--.soundtrack-component-spec
|
||||
(:require [quo2.components.record-audio.soundtrack.view :as soundtrack]
|
||||
[test-helpers.component :as h]
|
||||
[reagent.core :as reagent]
|
||||
[status-im.audio.core :as audio]))
|
||||
|
||||
(h/describe "soundtrack component"
|
||||
(h/before-each
|
||||
(fn []
|
||||
(h/use-fake-timers)))
|
||||
|
||||
(h/after-each
|
||||
(fn []
|
||||
(h/clear-all-timers)
|
||||
(h/use-real-timers)))
|
||||
|
||||
(h/test "renders soundtrack"
|
||||
(with-redefs [audio/get-player-duration (fn [] 2000)]
|
||||
(let [player-ref (reagent/atom {})
|
||||
audio-current-time-ms (reagent/atom 0)]
|
||||
(h/render [soundtrack/soundtrack
|
||||
{:player-ref player-ref
|
||||
:audio-current-time-ms audio-current-time-ms}])
|
||||
(-> (h/expect (h/get-by-test-id "soundtrack"))
|
||||
(.toBeTruthy)))))
|
||||
|
||||
(h/test "soundtrack on-sliding-start works"
|
||||
(with-redefs [audio/get-player-duration (fn [] 2000)]
|
||||
(let [seeking-audio? (reagent/atom false)
|
||||
player-ref (reagent/atom {})
|
||||
audio-current-time-ms (reagent/atom 0)]
|
||||
(h/render [soundtrack/soundtrack
|
||||
{:seeking-audio? seeking-audio?
|
||||
:player-ref player-ref
|
||||
:audio-current-time-ms audio-current-time-ms}])
|
||||
(h/fire-event
|
||||
:on-sliding-start
|
||||
(h/get-by-test-id "soundtrack"))
|
||||
(-> (h/expect @seeking-audio?)
|
||||
(.toBe true)))))
|
||||
|
||||
(h/test "soundtrack on-sliding-complete works"
|
||||
(with-redefs [audio/get-player-duration (fn [] 2000)
|
||||
audio/seek-player (js/jest.fn)]
|
||||
(let [seeking-audio? (reagent/atom false)
|
||||
player-ref (reagent/atom {})
|
||||
audio-current-time-ms (reagent/atom 0)]
|
||||
(h/render [soundtrack/soundtrack
|
||||
{:seeking-audio? seeking-audio?
|
||||
:player-ref player-ref
|
||||
:audio-current-time-ms audio-current-time-ms}])
|
||||
(h/fire-event
|
||||
:on-sliding-start
|
||||
(h/get-by-test-id "soundtrack"))
|
||||
(h/fire-event
|
||||
:on-sliding-complete
|
||||
(h/get-by-test-id "soundtrack")
|
||||
1000)
|
||||
(-> (h/expect @seeking-audio?)
|
||||
(.toBe false))
|
||||
(-> (h/expect audio/seek-player)
|
||||
(.toHaveBeenCalledTimes 1)))))
|
||||
|
||||
(h/test "soundtrack on-value-change when seeking audio works"
|
||||
(with-redefs [audio/get-player-duration (fn [] 2000)
|
||||
audio/seek-player (js/jest.fn)]
|
||||
(let [seeking-audio? (reagent/atom false)
|
||||
player-ref (reagent/atom {})
|
||||
audio-current-time-ms (reagent/atom 0)]
|
||||
(h/render [soundtrack/soundtrack
|
||||
{:seeking-audio? seeking-audio?
|
||||
:player-ref player-ref
|
||||
:audio-current-time-ms audio-current-time-ms}])
|
||||
(h/fire-event
|
||||
:on-sliding-start
|
||||
(h/get-by-test-id "soundtrack"))
|
||||
(h/fire-event
|
||||
:on-value-change
|
||||
(h/get-by-test-id "soundtrack")
|
||||
1000)
|
||||
(-> (h/expect @audio-current-time-ms)
|
||||
(.toBe 1000))))))
|
||||
@@ -0,0 +1,16 @@
|
||||
(ns quo2.components.record-audio.soundtrack.style
|
||||
(:require [react-native.platform :as platform]))
|
||||
|
||||
(defn player-slider-container
|
||||
[]
|
||||
(merge
|
||||
{:position :absolute
|
||||
:left (if platform/ios? 115 104)
|
||||
:right (if platform/ios? 108 92)
|
||||
:bottom (if platform/ios? 16 27)}
|
||||
(when platform/android?
|
||||
;; Workaround to increase the thickness of the slider track on Android
|
||||
;; which is currently not supported by the Slider library and remove
|
||||
;; the thumb shadow that appears when dragging.
|
||||
{:transform [{:scaleY 2}]
|
||||
:background-color :transparent})))
|
||||
@@ -0,0 +1,38 @@
|
||||
(ns quo2.components.record-audio.soundtrack.view
|
||||
(:require [quo2.components.record-audio.soundtrack.style :as style]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[status-im.audio.core :as audio]
|
||||
[taoensso.timbre :as log]
|
||||
[react-native.platform :as platform]
|
||||
[react-native.slider :as slider]))
|
||||
|
||||
(def ^:private thumb-light (js/require "../resources/images/icons2/12x12/thumb-light.png"))
|
||||
(def ^:private thumb-dark (js/require "../resources/images/icons2/12x12/thumb-dark.png"))
|
||||
|
||||
(defn soundtrack
|
||||
[{:keys [audio-current-time-ms player-ref seeking-audio?]}]
|
||||
[:f>
|
||||
(fn []
|
||||
(let [audio-duration-ms (audio/get-player-duration @player-ref)]
|
||||
[:<>
|
||||
[slider/slider
|
||||
{:test-ID "soundtrack"
|
||||
:style (style/player-slider-container)
|
||||
:minimum-value 0
|
||||
:maximum-value audio-duration-ms
|
||||
:value @audio-current-time-ms
|
||||
:on-sliding-start #(reset! seeking-audio? true)
|
||||
:on-sliding-complete (fn [seek-time]
|
||||
(reset! seeking-audio? false)
|
||||
(audio/seek-player
|
||||
@player-ref
|
||||
seek-time
|
||||
#(log/debug "[record-audio] on seek - seek time: " seek-time)
|
||||
#(log/error "[record-audio] on seek - error: " %)))
|
||||
:on-value-change #(when @seeking-audio?
|
||||
(reset! audio-current-time-ms %))
|
||||
:thumb-image (if (colors/dark?) thumb-dark thumb-light)
|
||||
:minimum-track-tint-color (colors/theme-colors colors/primary-50 colors/primary-60)
|
||||
:maximum-track-tint-color (colors/theme-colors
|
||||
(if platform/ios? colors/neutral-20 colors/neutral-40)
|
||||
(if platform/ios? colors/neutral-80 colors/neutral-60))}]]))])
|
||||
@@ -5,26 +5,6 @@
|
||||
[reagent.core :as reagent]
|
||||
[quo2.components.selectors.styles :as style]))
|
||||
|
||||
|
||||
(defn- get-color
|
||||
[checked? disabled? blurred-background?]
|
||||
(cond
|
||||
checked?
|
||||
(colors/custom-color-by-theme
|
||||
:primary
|
||||
50
|
||||
60
|
||||
(when disabled? 30)
|
||||
(when disabled? 30))
|
||||
blurred-background?
|
||||
(colors/theme-colors
|
||||
(colors/alpha colors/neutral-80 (if disabled? 0.05 0.1))
|
||||
(colors/alpha colors/white (if disabled? 0.05 0.1)))
|
||||
:else
|
||||
(colors/theme-colors
|
||||
(colors/alpha colors/neutral-20 (if disabled? 0.4 1))
|
||||
(colors/alpha colors/neutral-70 (if disabled? 0.3 1)))))
|
||||
|
||||
(defn- handle-press
|
||||
[disabled? on-change checked?]
|
||||
(when (not disabled?)
|
||||
@@ -34,176 +14,96 @@
|
||||
|
||||
(defn checkbox-prefill
|
||||
[{:keys [default-checked?]}]
|
||||
(let [checked? (reagent/atom (or default-checked? false))]
|
||||
(fn [{:keys [on-change disabled? blurred-background? container-style]}]
|
||||
[rn/touchable-without-feedback
|
||||
{:on-press (handle-press disabled? on-change checked?)}
|
||||
[rn/view
|
||||
{:style (merge
|
||||
container-style
|
||||
{:height 21
|
||||
:width 21
|
||||
:border-radius 6
|
||||
:background-color (if blurred-background?
|
||||
(colors/theme-colors
|
||||
(colors/alpha colors/neutral-80
|
||||
(if disabled? 0.05 0.1))
|
||||
(colors/alpha colors/white (if disabled? 0.05 0.1)))
|
||||
(colors/theme-colors
|
||||
(colors/alpha colors/neutral-20
|
||||
(if disabled? 0.3 1))
|
||||
(colors/alpha colors/neutral-70
|
||||
(if disabled? 0.3 1))))})
|
||||
:accessibility-label (str "checkbox-" (if @checked? "on" "off"))
|
||||
:accessibility-role :checkbox
|
||||
:testID "checkbox-prefill-component"}
|
||||
(when @checked?
|
||||
[rn/view
|
||||
{:style
|
||||
{:height 20
|
||||
:width 20}}
|
||||
[icons/icon :i/check-small
|
||||
{:size 20
|
||||
:color (colors/theme-colors
|
||||
(colors/alpha colors/neutral-100 (if disabled? 0.3 1))
|
||||
(colors/alpha colors/white (if disabled? 0.3 1)))}]])]])))
|
||||
|
||||
(let [internal-checked? (reagent/atom (or default-checked? false))]
|
||||
(fn [{:keys [on-change disabled? blurred-background? container-style checked?]}]
|
||||
(when (and (not (nil? checked?)) (not= @internal-checked? checked?))
|
||||
(reset! internal-checked? checked?))
|
||||
(let [checked? (or checked? @internal-checked?)]
|
||||
[rn/touchable-without-feedback
|
||||
{:on-press (handle-press disabled? on-change internal-checked?)}
|
||||
[rn/view
|
||||
{:style (merge
|
||||
container-style
|
||||
(style/checkbox-prefill blurred-background? disabled?))
|
||||
:accessibility-label (str "checkbox-" (if checked? "on" "off"))
|
||||
:accessibility-role :checkbox
|
||||
:testID "checkbox-prefill-component"}
|
||||
(when checked?
|
||||
[rn/view
|
||||
{:style
|
||||
{:height 20
|
||||
:width 20}}
|
||||
[icons/icon :i/check-small
|
||||
{:size 20
|
||||
:color (colors/theme-colors
|
||||
(colors/alpha colors/neutral-100 (if disabled? 0.3 1))
|
||||
(colors/alpha colors/white (if disabled? 0.3 1)))}]])]]))))
|
||||
|
||||
(defn checkbox
|
||||
[{:keys [default-checked?]}]
|
||||
(let [checked? (reagent/atom (or default-checked? false))]
|
||||
(fn [{:keys [on-change disabled? blurred-background? container-style]}]
|
||||
[rn/touchable-without-feedback
|
||||
{:on-press (handle-press disabled? on-change checked?)}
|
||||
[rn/view
|
||||
{:style (merge
|
||||
container-style
|
||||
{:height 20
|
||||
:width 20})}
|
||||
[rn/view
|
||||
{:style {:flex 1
|
||||
:border-radius 6
|
||||
:border-width (if @checked? 0 1)
|
||||
:background-color (cond
|
||||
@checked?
|
||||
(get-color @checked? disabled? blurred-background?)
|
||||
blurred-background?
|
||||
(colors/theme-colors
|
||||
colors/white-opa-5
|
||||
colors/white-opa-10)
|
||||
:else
|
||||
(colors/theme-colors
|
||||
colors/white
|
||||
colors/neutral-80-opa-40))
|
||||
:border-color (if @checked?
|
||||
:none
|
||||
(get-color @checked? disabled? blurred-background?))}
|
||||
:accessibility-label (str "checkbox-" (if @checked? "on" "off"))
|
||||
:accessibility-role :checkbox
|
||||
:testID "checkbox-component"}
|
||||
(when @checked?
|
||||
[rn/view
|
||||
{:style
|
||||
{:height 20
|
||||
:width 20}}
|
||||
[icons/icon :i/check-small
|
||||
{:size 20
|
||||
:color colors/white}]])]]])))
|
||||
|
||||
;; TODO (Omar): issue https://github.com/status-im/status-mobile/issues/14681
|
||||
;(defn checkbox
|
||||
; [{:keys [default-checked?]}]
|
||||
; (let [checked? (reagent/atom (or default-checked? false))]
|
||||
; @(reagent/track
|
||||
; (fn [{:keys [on-change disabled? blurred-background? container-style]}]
|
||||
; [rn/touchable-without-feedback
|
||||
; {:on-press (handle-press disabled? on-change checked?)}
|
||||
; [rn/view
|
||||
; {:style (merge
|
||||
; container-style
|
||||
; {:height 20
|
||||
; :width 20})}
|
||||
; [rn/view
|
||||
; {:style (style/checkbox-toggle checked? disabled? blurred-background?)
|
||||
; :accessibility-label (str "checkbox-" (if @checked? "on" "off"))
|
||||
; :accessibility-role :checkbox
|
||||
; :testID "checkbox-component"}
|
||||
; (when @checked?
|
||||
; [rn/view
|
||||
; {:style
|
||||
; {:height 20
|
||||
; :width 20}}
|
||||
; [icons/icon :i/check-small
|
||||
; {:size 20
|
||||
; :color colors/white}]])]]])
|
||||
; checked?)))
|
||||
(let [internal-checked? (reagent/atom (or default-checked? false))]
|
||||
(fn [{:keys [on-change disabled? blurred-background? container-style checked?]}]
|
||||
(when (and (not (nil? checked?)) (not= @internal-checked? checked?))
|
||||
(reset! internal-checked? checked?))
|
||||
(let [checked? (or checked? @internal-checked?)]
|
||||
[rn/touchable-without-feedback
|
||||
{:on-press (handle-press disabled? on-change internal-checked?)}
|
||||
[rn/view
|
||||
{:style (merge
|
||||
container-style
|
||||
{:height 20
|
||||
:width 20})}
|
||||
[rn/view
|
||||
{:style (style/checkbox blurred-background? disabled? checked?)
|
||||
:accessibility-label (str "checkbox-" (if checked? "on" "off"))
|
||||
:accessibility-role :checkbox
|
||||
:testID "checkbox-component"}
|
||||
(when checked?
|
||||
[rn/view
|
||||
{:style
|
||||
{:height 20
|
||||
:width 20}}
|
||||
[icons/icon :i/check-small
|
||||
{:size 20
|
||||
:color colors/white}]])]]]))))
|
||||
|
||||
(defn radio
|
||||
[{:keys [default-checked?]}]
|
||||
(let [checked? (reagent/atom (or default-checked? false))]
|
||||
(fn [{:keys [on-change disabled? blurred-background? container-style]}]
|
||||
[rn/touchable-without-feedback
|
||||
{:on-press (handle-press disabled? on-change checked?)}
|
||||
[rn/view
|
||||
{:style (merge
|
||||
container-style
|
||||
{:height 20
|
||||
:width 20
|
||||
:border-radius 20
|
||||
:border-width 1
|
||||
:border-color (style/get-color @checked?
|
||||
disabled?
|
||||
blurred-background?)
|
||||
:background-color (when-not blurred-background?
|
||||
(colors/theme-colors colors/white
|
||||
(colors/alpha colors/neutral-80
|
||||
0.4)))})
|
||||
:accessibility-label (str "radio-" (if @checked? "on" "off"))
|
||||
:accessibility-role :checkbox
|
||||
:testID "radio-component"}
|
||||
(let [internal-checked? (reagent/atom (or default-checked? false))]
|
||||
(fn [{:keys [on-change disabled? blurred-background? container-style checked?]}]
|
||||
(when (and (not (nil? checked?)) (not= @internal-checked? checked?))
|
||||
(reset! internal-checked? checked?))
|
||||
(let [checked? (or checked? @internal-checked?)]
|
||||
[rn/touchable-without-feedback
|
||||
{:on-press (handle-press disabled? on-change internal-checked?)}
|
||||
[rn/view
|
||||
{:style (merge
|
||||
container-style
|
||||
(style/radio checked? disabled? blurred-background?))
|
||||
:accessibility-label (str "radio-" (if checked? "on" "off"))
|
||||
:accessibility-role :checkbox
|
||||
:testID "radio-component"}
|
||||
|
||||
[rn/view
|
||||
{:style
|
||||
{:margin-left :auto
|
||||
:height 14
|
||||
:width 14
|
||||
:background-color (when @checked? (style/get-color @checked? disabled? blurred-background?))
|
||||
:border-radius 20
|
||||
:margin-right :auto
|
||||
:margin-top :auto
|
||||
:margin-bottom :auto}}]]])))
|
||||
[rn/view
|
||||
{:style
|
||||
(style/radio-inner checked? disabled? blurred-background?)}]]]))))
|
||||
|
||||
(defn toggle
|
||||
[{:keys [default-checked?]}]
|
||||
(let [checked? (reagent/atom (or default-checked? false))]
|
||||
(fn [{:keys [on-change disabled? blurred-background? container-style]}]
|
||||
[rn/touchable-without-feedback
|
||||
{:on-press (handle-press disabled? on-change checked?)}
|
||||
[rn/view
|
||||
{:style (merge
|
||||
container-style
|
||||
{:height 20
|
||||
:width 30
|
||||
:border-radius 20
|
||||
:background-color (style/get-color @checked?
|
||||
disabled?
|
||||
blurred-background?)})
|
||||
:accessibility-label (str "toggle-" (if @checked? "on" "off"))
|
||||
:accessibility-role :checkbox
|
||||
:testID "toggle-component"}
|
||||
[rn/view
|
||||
{:style
|
||||
{:margin-left (if @checked? 12 2)
|
||||
:height 16
|
||||
:width 16
|
||||
:background-color (if blurred-background?
|
||||
(colors/theme-colors
|
||||
(colors/alpha colors/white (if disabled? 0.4 1))
|
||||
(colors/alpha colors/white (if disabled? 0.3 1)))
|
||||
(colors/theme-colors
|
||||
(colors/alpha colors/white 1)
|
||||
(colors/alpha colors/white (if disabled? 0.4 1))))
|
||||
:border-radius 20
|
||||
:margin-right :auto
|
||||
:margin-top :auto
|
||||
:margin-bottom :auto}}]]])))
|
||||
(let [internal-checked? (reagent/atom (or default-checked? false))]
|
||||
(fn [{:keys [on-change disabled? blurred-background? container-style checked?]}]
|
||||
(when (and (not (nil? checked?)) (not= @internal-checked? checked?))
|
||||
(reset! internal-checked? checked?))
|
||||
(let [checked? (or checked? @internal-checked?)]
|
||||
[rn/touchable-without-feedback
|
||||
{:on-press (handle-press disabled? on-change internal-checked?)}
|
||||
[rn/view
|
||||
{:style (merge
|
||||
container-style
|
||||
(style/toggle checked? disabled? blurred-background?))
|
||||
:accessibility-label (str "toggle-" (if checked? "on" "off"))
|
||||
:accessibility-role :checkbox
|
||||
:testID "toggle-component"}
|
||||
[rn/view
|
||||
{:style
|
||||
(style/toggle-inner checked? disabled? blurred-background?)}]]]))))
|
||||
|
||||
@@ -20,6 +20,44 @@
|
||||
(colors/alpha colors/neutral-20 (if disabled? 0.4 1))
|
||||
(colors/alpha colors/neutral-70 (if disabled? 0.3 1)))))
|
||||
|
||||
(defn checkbox-prefill
|
||||
[blurred-background? disabled?]
|
||||
{:height 21
|
||||
:width 21
|
||||
:border-radius 6
|
||||
:background-color (if blurred-background?
|
||||
(colors/theme-colors
|
||||
(colors/alpha colors/neutral-80
|
||||
(if disabled? 0.05 0.1))
|
||||
(colors/alpha colors/white (if disabled? 0.05 0.1)))
|
||||
(colors/theme-colors
|
||||
(colors/alpha colors/neutral-20
|
||||
(if disabled? 0.3 1))
|
||||
(colors/alpha colors/neutral-70
|
||||
(if disabled? 0.3 1))))})
|
||||
|
||||
(defn checkbox
|
||||
[blurred-background? disabled? checked?]
|
||||
{:flex 1
|
||||
:border-radius 6
|
||||
:border-width (if checked? 0 1)
|
||||
:background-color (cond
|
||||
checked?
|
||||
(get-color checked? disabled? blurred-background?)
|
||||
blurred-background?
|
||||
(colors/theme-colors
|
||||
colors/white-opa-5
|
||||
colors/white-opa-10)
|
||||
:else
|
||||
(colors/theme-colors
|
||||
colors/white
|
||||
colors/neutral-80-opa-40))
|
||||
:border-color (if checked?
|
||||
:none
|
||||
(get-color checked?
|
||||
disabled?
|
||||
blurred-background?))})
|
||||
|
||||
(defn checkbox-toggle
|
||||
[checked? disabled? blurred-background?]
|
||||
{:flex 1
|
||||
@@ -38,4 +76,55 @@
|
||||
colors/neutral-80-opa-40))
|
||||
:border-color (if @checked?
|
||||
:none
|
||||
(get-color @checked? disabled? blurred-background?))})
|
||||
(get-color @checked? disabled? blurred-background?))})
|
||||
|
||||
(defn radio
|
||||
[checked? disabled? blurred-background?]
|
||||
{:height 20
|
||||
:width 20
|
||||
:border-radius 20
|
||||
:border-width 1
|
||||
:border-color (get-color checked?
|
||||
disabled?
|
||||
blurred-background?)
|
||||
:background-color (when-not blurred-background?
|
||||
(colors/theme-colors colors/white
|
||||
(colors/alpha colors/neutral-80
|
||||
0.4)))})
|
||||
|
||||
(defn toggle
|
||||
[checked? disabled? blurred-background?]
|
||||
{:height 20
|
||||
:width 30
|
||||
:border-radius 20
|
||||
:background-color (get-color checked?
|
||||
disabled?
|
||||
blurred-background?)})
|
||||
|
||||
(defn toggle-inner
|
||||
[checked? disabled? blurred-background?]
|
||||
{:margin-left (if checked? 12 2)
|
||||
:height 16
|
||||
:width 16
|
||||
:background-color (if blurred-background?
|
||||
(colors/theme-colors
|
||||
(colors/alpha colors/white (if disabled? 0.4 1))
|
||||
(colors/alpha colors/white (if disabled? 0.3 1)))
|
||||
(colors/theme-colors
|
||||
(colors/alpha colors/white 1)
|
||||
(colors/alpha colors/white (if disabled? 0.4 1))))
|
||||
:border-radius 20
|
||||
:margin-right :auto
|
||||
:margin-top :auto
|
||||
:margin-bottom :auto})
|
||||
|
||||
(defn radio-inner
|
||||
[checked? disabled? blurred-background?]
|
||||
{:margin-left :auto
|
||||
:height 14
|
||||
:width 14
|
||||
:background-color (when checked? (get-color checked? disabled? blurred-background?))
|
||||
:border-radius 20
|
||||
:margin-right :auto
|
||||
:margin-top :auto
|
||||
:margin-bottom :auto})
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
[rn/image
|
||||
{:style {:width 20
|
||||
:border-radius 10
|
||||
:background-color :red
|
||||
:background-color :white
|
||||
:height 20}
|
||||
:source photo}]
|
||||
[rn/view
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
(ns quo2.components.tags.tags
|
||||
(:require [reagent.core :as reagent]
|
||||
[quo.react-native :as rn]
|
||||
[oops.core :refer [oget]]
|
||||
[status-im.ui.components.react :as react]
|
||||
[status-im.utils.core :as utils]
|
||||
[quo2.components.tags.tag :as tag]
|
||||
[utils.number :as number-utils]))
|
||||
[utils.number :as number-utils]
|
||||
[react-native.core :as rn]
|
||||
[react-native.masked-view :as masked-view]
|
||||
[react-native.linear-gradient :as linear-gradient]
|
||||
[utils.collection :as utils.collection]))
|
||||
|
||||
(def default-tab-size 32)
|
||||
|
||||
@@ -76,9 +77,9 @@
|
||||
size default-tab-size}
|
||||
:as props}]
|
||||
(let [maybe-mask-wrapper (if fade-end?
|
||||
[react/masked-view
|
||||
[masked-view/masked-view
|
||||
{:mask-element (reagent/as-element
|
||||
[react/linear-gradient
|
||||
[linear-gradient/linear-gradient
|
||||
{:colors [:black :transparent]
|
||||
:locations [(get @fading :fade-end-percentage)
|
||||
1]
|
||||
@@ -92,64 +93,65 @@
|
||||
(conj
|
||||
maybe-mask-wrapper
|
||||
[rn/flat-list
|
||||
(merge (dissoc props
|
||||
:default-active
|
||||
:fade-end-percentage
|
||||
:fade-end?
|
||||
:on-change
|
||||
:scroll-on-press?
|
||||
:size)
|
||||
(when scroll-on-press?
|
||||
{:initial-scroll-index (utils/first-index #(= @active-tab-id (:id %)) data)})
|
||||
{:ref #(reset! flat-list-ref %)
|
||||
:extra-data (str @active-tab-id)
|
||||
:horizontal true
|
||||
:scroll-event-throttle scroll-event-throttle
|
||||
:shows-horizontal-scroll-indicator false
|
||||
:data data
|
||||
:key-fn (comp str :id)
|
||||
:on-scroll (fn [^js e]
|
||||
(when fade-end?
|
||||
(let [offset-x (oget e "nativeEvent.contentOffset.x")
|
||||
content-width (oget e "nativeEvent.contentSize.width")
|
||||
layout-width (oget e "nativeEvent.layoutMeasurement.width")
|
||||
new-percentage (calculate-fade-end-percentage
|
||||
{:offset-x offset-x
|
||||
:content-width content-width
|
||||
:layout-width layout-width
|
||||
:max-fade-percentage fade-end-percentage})]
|
||||
;; Avoid unnecessary re-rendering.
|
||||
(when (not= new-percentage (get @fading :fade-end-percentage))
|
||||
(swap! fading assoc :fade-end-percentage new-percentage))))
|
||||
(when on-scroll
|
||||
(on-scroll e)))
|
||||
:render-fn (fn [{:keys [id label resource]} index]
|
||||
[rn/view
|
||||
{:style {:margin-right (if (= size default-tab-size) 12 8)
|
||||
:padding-right (when (= index (dec (count data)))
|
||||
(get-in props [:style :padding-left]))}}
|
||||
[tag/tag
|
||||
{:id id
|
||||
:size size
|
||||
:active (= id @active-tab-id)
|
||||
:resource resource
|
||||
:blurred? blurred?
|
||||
:icon-color icon-color
|
||||
:disabled? disabled?
|
||||
:label label
|
||||
:type type
|
||||
:labelled? labelled?
|
||||
:on-press (fn [id]
|
||||
(reset! active-tab-id id)
|
||||
(when scroll-on-press?
|
||||
(.scrollToIndex ^js @flat-list-ref
|
||||
#js
|
||||
{:animated true
|
||||
:index index
|
||||
:viewPosition 0.5}))
|
||||
(when on-change
|
||||
(on-change id)))}
|
||||
label]])})])
|
||||
(merge
|
||||
(dissoc props
|
||||
:default-active
|
||||
:fade-end-percentage
|
||||
:fade-end?
|
||||
:on-change
|
||||
:scroll-on-press?
|
||||
:size)
|
||||
(when scroll-on-press?
|
||||
{:initial-scroll-index (utils.collection/first-index #(= @active-tab-id (:id %)) data)})
|
||||
{:ref #(reset! flat-list-ref %)
|
||||
:extra-data (str @active-tab-id)
|
||||
:horizontal true
|
||||
:scroll-event-throttle scroll-event-throttle
|
||||
:shows-horizontal-scroll-indicator false
|
||||
:data data
|
||||
:key-fn (comp str :id)
|
||||
:on-scroll (fn [^js e]
|
||||
(when fade-end?
|
||||
(let [offset-x (oget e "nativeEvent.contentOffset.x")
|
||||
content-width (oget e "nativeEvent.contentSize.width")
|
||||
layout-width (oget e "nativeEvent.layoutMeasurement.width")
|
||||
new-percentage (calculate-fade-end-percentage
|
||||
{:offset-x offset-x
|
||||
:content-width content-width
|
||||
:layout-width layout-width
|
||||
:max-fade-percentage fade-end-percentage})]
|
||||
;; Avoid unnecessary re-rendering.
|
||||
(when (not= new-percentage (get @fading :fade-end-percentage))
|
||||
(swap! fading assoc :fade-end-percentage new-percentage))))
|
||||
(when on-scroll
|
||||
(on-scroll e)))
|
||||
:render-fn (fn [{:keys [id label resource]} index]
|
||||
[rn/view
|
||||
{:style {:margin-right (if (= size default-tab-size) 12 8)
|
||||
:padding-right (when (= index (dec (count data)))
|
||||
(get-in props [:style :padding-left]))}}
|
||||
[tag/tag
|
||||
{:id id
|
||||
:size size
|
||||
:active (= id @active-tab-id)
|
||||
:resource resource
|
||||
:blurred? blurred?
|
||||
:icon-color icon-color
|
||||
:disabled? disabled?
|
||||
:label label
|
||||
:type type
|
||||
:labelled? labelled?
|
||||
:on-press (fn [id]
|
||||
(reset! active-tab-id id)
|
||||
(when scroll-on-press?
|
||||
(.scrollToIndex ^js @flat-list-ref
|
||||
#js
|
||||
{:animated true
|
||||
:index index
|
||||
:viewPosition 0.5}))
|
||||
(when on-change
|
||||
(on-change id)))}
|
||||
label]])})])
|
||||
[rn/view {:style {:flex-direction :row}}
|
||||
(for [{:keys [label id resource]} data]
|
||||
^{:key id}
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
quo2.components.dividers.date
|
||||
quo2.components.dividers.divider-label
|
||||
quo2.components.dividers.new-messages
|
||||
quo2.components.drawers.action-drawers
|
||||
quo2.components.drawers.action-drawers.view
|
||||
quo2.components.drawers.permission-context.view
|
||||
quo2.components.dropdowns.dropdown
|
||||
quo2.components.header
|
||||
quo2.components.icon
|
||||
@@ -41,6 +42,7 @@
|
||||
quo2.components.notifications.info-count
|
||||
quo2.components.notifications.notification-dot
|
||||
quo2.components.notifications.toast
|
||||
quo2.components.profile.profile-card.view
|
||||
quo2.components.reactions.reaction
|
||||
quo2.components.selectors.disclaimer.view
|
||||
quo2.components.selectors.filter.view
|
||||
@@ -52,8 +54,10 @@
|
||||
quo2.components.tabs.tabs
|
||||
quo2.components.tags.context-tags
|
||||
quo2.components.tags.status-tags
|
||||
quo2.components.profile.profile-card.view
|
||||
quo2.components.tags.tags))
|
||||
quo2.components.tags.permission-tag
|
||||
quo2.components.tags.tag
|
||||
quo2.components.tags.tags
|
||||
quo2.components.tags.token-tag))
|
||||
|
||||
(def toast quo2.components.notifications.toast/toast)
|
||||
(def button quo2.components.buttons.button/button)
|
||||
@@ -63,7 +67,6 @@
|
||||
(def separator quo2.components.separator/separator)
|
||||
(def counter quo2.components.counter.counter/counter)
|
||||
(def header quo2.components.header/header)
|
||||
(def action-drawer quo2.components.drawers.action-drawers/action-drawer)
|
||||
(def dropdown quo2.components.dropdowns.dropdown/dropdown)
|
||||
(def info-message quo2.components.info.info-message/info-message)
|
||||
(def information-box quo2.components.info.information-box/information-box)
|
||||
@@ -71,7 +74,6 @@
|
||||
(def system-message quo2.components.messages.system-message/system-message)
|
||||
(def reaction quo2.components.reactions.reaction/reaction)
|
||||
(def add-reaction quo2.components.reactions.reaction/add-reaction)
|
||||
(def tags quo2.components.tags.tags/tags)
|
||||
(def user-avatar-tag quo2.components.tags.context-tags/user-avatar-tag)
|
||||
(def context-tag quo2.components.tags.context-tags/context-tag)
|
||||
(def group-avatar-tag quo2.components.tags.context-tags/group-avatar-tag)
|
||||
@@ -80,7 +82,6 @@
|
||||
(def tabs quo2.components.tabs.tabs/tabs)
|
||||
(def account-selector quo2.components.tabs.account-selector/account-selector)
|
||||
(def floating-shell-button quo2.components.navigation.floating-shell-button/floating-shell-button)
|
||||
(def status-tag quo2.components.tags.status-tags/status-tag)
|
||||
(def page-nav quo2.components.navigation.page-nav/page-nav)
|
||||
(def disclaimer quo2.components.selectors.disclaimer.view/view)
|
||||
(def checkbox quo2.components.selectors.selectors/checkbox)
|
||||
@@ -118,6 +119,10 @@
|
||||
(def new-messages quo2.components.dividers.new-messages/new-messages)
|
||||
(def divider-date quo2.components.dividers.date/date)
|
||||
|
||||
;;;; DRAWERS
|
||||
(def action-drawer quo2.components.drawers.action-drawers.view/action-drawer)
|
||||
(def permission-context quo2.components.drawers.permission-context.view/view)
|
||||
|
||||
;;;; LIST ITEMS
|
||||
(def channel-list-item quo2.components.list-items.channel/list-item)
|
||||
(def menu-item quo2.components.list-items.menu-item/menu-item)
|
||||
@@ -135,3 +140,10 @@
|
||||
;;;; SETTINGS
|
||||
(def privacy-option quo2.components.settings.privacy-option/card)
|
||||
(def account quo2.components.settings.accounts.view/account)
|
||||
|
||||
;;;; TAGS
|
||||
(def tag quo2.components.tags.tag/tag)
|
||||
(def tags quo2.components.tags.tags/tags)
|
||||
(def permission-tag quo2.components.tags.permission-tag/tag)
|
||||
(def status-tag quo2.components.tags.status-tags/status-tag)
|
||||
(def token-tag quo2.components.tags.token-tag/tag)
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
[quo2.components.buttons.--tests--.buttons-component-spec]
|
||||
[quo2.components.counter.--tests--.counter-component-spec]
|
||||
[quo2.components.dividers.--tests--.divider-label-component-spec]
|
||||
[quo2.components.drawers.--tests--.action-drawers-component-spec]
|
||||
[quo2.components.drawers.permission-context.--tests--.permission-context-component-spec]
|
||||
[quo2.components.drawers.action-drawers.component-spec]
|
||||
[quo2.components.drawers.permission-context.component-spec]
|
||||
[quo2.components.markdown.--tests--.text-component-spec]
|
||||
[quo2.components.selectors.--tests--.selectors-component-spec]
|
||||
[quo2.components.selectors.filter.component-spec]))
|
||||
[quo2.components.selectors.filter.component-spec]
|
||||
[quo2.components.record-audio.record-audio.--tests--.record-audio-component-spec]
|
||||
[quo2.components.record-audio.soundtrack.--tests--.soundtrack-component-spec]))
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
(ns quo2.foundations.shadows
|
||||
(:require [quo2.foundations.colors :as colors]
|
||||
[quo2.theme :as theme]))
|
||||
|
||||
(defn- get-inverted
|
||||
[inverted? number]
|
||||
(if inverted? (* -1 number) number))
|
||||
|
||||
(defn- get-scales
|
||||
[inverted?]
|
||||
(if (theme/dark?)
|
||||
{:shadow-1 {:shadow-color (colors/alpha colors/neutral-100 0.5)
|
||||
:shadow-offset {:width 0
|
||||
:height (get-inverted inverted? 4)}
|
||||
:elevation 3
|
||||
:shadow-opacity 1
|
||||
:shadow-radius 20}
|
||||
:shadow-2 {:shadow-color (colors/alpha colors/neutral-100 0.64)
|
||||
:shadow-offset {:width 0
|
||||
:height (get-inverted inverted? 4)}
|
||||
:elevation 4
|
||||
:shadow-opacity 1
|
||||
:shadow-radius 20}
|
||||
:shadow-3 {:shadow-color (colors/alpha colors/neutral-100 0.64)
|
||||
:shadow-offset {:width 0
|
||||
:height (get-inverted inverted? 12)}
|
||||
:elevation 8
|
||||
:shadow-opacity 1
|
||||
:shadow-radius 20}
|
||||
:shadow-4 {:shadow-color (colors/alpha colors/neutral-100 0.72)
|
||||
:shadow-offset {:width 0
|
||||
:height (get-inverted inverted? 16)}
|
||||
:shadow-opacity 1
|
||||
:shadow-radius 20
|
||||
:elevation 15}}
|
||||
{:shadow-1 {:shadow-color (colors/alpha colors/neutral-100 0.04)
|
||||
:shadow-offset {:width 0
|
||||
:height (get-inverted inverted? 4)}
|
||||
:elevation 1
|
||||
:shadow-opacity 1
|
||||
:shadow-radius 16}
|
||||
:shadow-2 {:shadow-color (colors/alpha colors/neutral-100 0.08)
|
||||
:shadow-offset {:width 0
|
||||
:height (get-inverted inverted? 4)}
|
||||
:elevation 2
|
||||
:shadow-opacity 1
|
||||
:shadow-radius 16}
|
||||
:shadow-3 {:shadow-color (colors/alpha colors/neutral-100 0.12)
|
||||
:shadow-offset {:width 0
|
||||
:height (get-inverted inverted? 12)}
|
||||
:elevation 5
|
||||
:shadow-opacity 1
|
||||
:shadow-radius 16}
|
||||
:shadow-4 {:shadow-color (colors/alpha colors/neutral-100 0.16)
|
||||
:shadow-offset {:width 0
|
||||
:height (get-inverted inverted? 16)}
|
||||
:shadow-opacity 1
|
||||
:shadow-radius 16
|
||||
:elevation 13}}))
|
||||
|
||||
(def normal-scale (get-scales false))
|
||||
|
||||
(def inverted-scale (get-scales true))
|
||||
|
||||
(def inner-shadow
|
||||
{:shadow-color (colors/alpha colors/neutral-100 0.08)
|
||||
:shadow-offset {:width 0
|
||||
:height 0}
|
||||
:shadow-opacity 1
|
||||
:shadow-radius 16
|
||||
:elevation 13})
|
||||
@@ -0,0 +1,10 @@
|
||||
(ns react-native.clipboard
|
||||
(:require ["@react-native-community/clipboard" :default Clipboard]))
|
||||
|
||||
(defn set-string
|
||||
[text]
|
||||
(.setString ^js Clipboard text))
|
||||
|
||||
(defn get-string
|
||||
[callback]
|
||||
(.then (.getString ^js Clipboard) #(callback %)))
|
||||
@@ -94,11 +94,12 @@
|
||||
|
||||
(defn use-effect
|
||||
([effect-fn]
|
||||
(use-effect effect-fn []))
|
||||
([effect-fn deps]
|
||||
(react/useEffect
|
||||
#(let [ret (effect-fn)]
|
||||
(if (fn? ret) ret js/undefined))))
|
||||
([effect-fn deps]
|
||||
(react/useEffect effect-fn (bean/->js deps))))
|
||||
(if (fn? ret) ret js/undefined))
|
||||
(bean/->js deps))))
|
||||
|
||||
(defn use-effect-once
|
||||
[effect-fn]
|
||||
@@ -117,3 +118,14 @@
|
||||
{:ease-in-ease-out (-> ^js layout-animation .-Presets .-easeInEaseOut)
|
||||
:linear (-> ^js layout-animation .-Presets .-linear)
|
||||
:spring (-> ^js layout-animation .-Presets .-spring)})
|
||||
|
||||
(def find-node-handle (.-findNodeHandle ^js react-native))
|
||||
|
||||
(defn selectable-text-input-manager
|
||||
[]
|
||||
(when (exists? (.-NativeModules ^js react-native))
|
||||
(.-RNSelectableTextInputManager ^js (.-NativeModules ^js react-native))))
|
||||
|
||||
(defonce selectable-text-input
|
||||
(reagent/adapt-react-class
|
||||
(.requireNativeComponent ^js react-native "RNSelectableTextInput")))
|
||||
|
||||
@@ -14,11 +14,14 @@
|
||||
[_]
|
||||
(let [loaded? (reagent/atom false)
|
||||
error? (reagent/atom false)]
|
||||
(fn [props]
|
||||
(fn [{:keys [source] :as props}]
|
||||
[fast-image-class
|
||||
(merge
|
||||
props
|
||||
{:on-error (fn [e]
|
||||
{:source (if (string? source)
|
||||
{:uri source}
|
||||
source)
|
||||
:on-error (fn [e]
|
||||
(when-let [on-error (:on-error props)]
|
||||
(on-error e))
|
||||
(reset! error? true))
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
(ns react-native.permissions
|
||||
(:require ["react-native-permissions" :refer (check requestMultiple PERMISSIONS RESULTS)]
|
||||
[react-native.platform :as platform]))
|
||||
|
||||
(def permissions-map
|
||||
{:read-external-storage (cond
|
||||
platform/android? (.-READ_EXTERNAL_STORAGE (.-ANDROID PERMISSIONS)))
|
||||
:write-external-storage (cond
|
||||
platform/low-device? (.-WRITE_EXTERNAL_STORAGE (.-ANDROID PERMISSIONS)))
|
||||
:camera (cond
|
||||
platform/android? (.-CAMERA (.-ANDROID PERMISSIONS))
|
||||
platform/ios? (.-CAMERA (.-IOS PERMISSIONS)))
|
||||
:record-audio (cond
|
||||
platform/android? (.-RECORD_AUDIO (.-ANDROID PERMISSIONS))
|
||||
platform/ios? (.-MICROPHONE (.-IOS PERMISSIONS)))})
|
||||
|
||||
(defn all-granted?
|
||||
[permissions]
|
||||
(let [permission-vals (distinct (vals permissions))]
|
||||
(and (= (count permission-vals) 1)
|
||||
(not (#{(.-BLOCKED RESULTS) (.-DENIED RESULTS)} (first permission-vals))))))
|
||||
|
||||
(defn request-permissions
|
||||
[{:keys [permissions on-allowed on-denied]
|
||||
:or {on-allowed #()
|
||||
on-denied #()}}]
|
||||
(let [permissions (remove nil? (mapv #(get permissions-map %) permissions))]
|
||||
(if (empty? permissions)
|
||||
(on-allowed)
|
||||
(-> (requestMultiple (clj->js permissions))
|
||||
(.then #(if (all-granted? (js->clj %))
|
||||
(on-allowed)
|
||||
(on-denied)))
|
||||
(.catch on-denied)))))
|
||||
|
||||
(defn permission-granted?
|
||||
[permission on-result on-error]
|
||||
(-> (check (get permissions-map permission))
|
||||
(.then #(on-result (not (#{(.-BLOCKED RESULTS) (.-DENIED RESULTS)} %))))
|
||||
(.catch #(on-error %))))
|
||||
@@ -1,6 +1,7 @@
|
||||
(ns react-native.reanimated
|
||||
(:require ["react-native" :as rn]
|
||||
["react-native-linear-gradient" :default LinearGradient]
|
||||
["@react-native-community/blur" :as blur]
|
||||
["react-native-reanimated" :default reanimated :refer
|
||||
(useSharedValue useAnimatedStyle
|
||||
withTiming
|
||||
@@ -13,7 +14,6 @@
|
||||
SlideInUp
|
||||
SlideOutUp
|
||||
LinearTransition)]
|
||||
[camel-snake-kebab.core :as csk]
|
||||
[reagent.core :as reagent]
|
||||
[utils.collection]))
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
(def touchable-opacity (create-animated-component (.-TouchableOpacity ^js rn)))
|
||||
|
||||
(def linear-gradient (create-animated-component LinearGradient))
|
||||
(def blur-view (create-animated-component (.-BlurView blur)))
|
||||
|
||||
;; Hooks
|
||||
(def use-shared-value useSharedValue)
|
||||
@@ -60,31 +61,27 @@
|
||||
|
||||
(defn set-shared-value
|
||||
[anim val]
|
||||
(when anim
|
||||
(when (and anim (some? val))
|
||||
(set! (.-value anim) val)))
|
||||
|
||||
;; Worklets
|
||||
(def worklet-factory (js/require "../src/js/worklet_factory.js"))
|
||||
|
||||
(defn interpolate
|
||||
[shared-value input-range output-range]
|
||||
(.interpolateValue ^js worklet-factory
|
||||
shared-value
|
||||
(clj->js input-range)
|
||||
(clj->js output-range)))
|
||||
([shared-value input-range output-range]
|
||||
(interpolate shared-value input-range output-range nil))
|
||||
([shared-value input-range output-range extrapolation]
|
||||
(.interpolateValue ^js worklet-factory
|
||||
shared-value
|
||||
(clj->js input-range)
|
||||
(clj->js output-range)
|
||||
(clj->js extrapolation))))
|
||||
|
||||
;;;; Component Animations
|
||||
|
||||
;; kebab-case styles are not working for worklets
|
||||
;; so first convert kebab case styles into camel case styles
|
||||
(defn apply-animations-to-style
|
||||
[animations style]
|
||||
(let [animations (utils.collection/map-keys csk/->camelCaseString animations)
|
||||
style (apply dissoc
|
||||
(utils.collection/map-keys csk/->camelCaseString style)
|
||||
(keys animations))]
|
||||
(use-animated-style
|
||||
(.applyAnimationsToStyle ^js worklet-factory (clj->js animations) (clj->js style)))))
|
||||
(use-animated-style
|
||||
(.applyAnimationsToStyle ^js worklet-factory (clj->js animations) (clj->js style))))
|
||||
|
||||
;; Animators
|
||||
(defn animate-shared-value-with-timing
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
(ns react-native.slider
|
||||
(:require ["@react-native-community/slider" :default Slider]
|
||||
[reagent.core :as reagent]))
|
||||
|
||||
(def slider (reagent/adapt-react-class Slider))
|
||||
@@ -2,7 +2,7 @@
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.add-new.db :as db]
|
||||
[status-im.chat.models :as chat]
|
||||
[status-im2.contexts.chat.events :as chat]
|
||||
[status-im.contact.core :as contact]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.ethereum.ens :as ens]
|
||||
@@ -91,7 +91,7 @@
|
||||
(i18n/label :t/use-valid-contact-code)
|
||||
:yourself
|
||||
(i18n/label :t/can-not-add-yourself))
|
||||
:on-dismiss #(re-frame/dispatch [:pop-to-root-tab :chat-stack])}})))
|
||||
:on-dismiss #(re-frame/dispatch [:pop-to-root-tab :shell-stack])}})))
|
||||
|
||||
(rf/defn qr-code-scanned
|
||||
{:events [:contact/qr-code-scanned]}
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
(ns status-im.chat.db
|
||||
(:require [status-im2.constants :as constants]))
|
||||
|
||||
(defn group-chat-name
|
||||
[{:keys [public? name]}]
|
||||
(str (when public? "#") name))
|
||||
|
||||
(defn intersperse-datemark
|
||||
"Reduce step which expects the input list of messages to be sorted by clock value.
|
||||
It makes best effort to group them by day.
|
||||
We cannot sort them by :timestamp, as that represents the clock of the sender
|
||||
and we have no guarantees on the order.
|
||||
We naively and arbitrarly group them assuming that out-of-order timestamps
|
||||
fall in the previous bucket.
|
||||
A sends M1 to B with timestamp 2000-01-01T00:00:00
|
||||
B replies M2 with timestamp 1999-12-31-23:59:59
|
||||
M1 needs to be displayed before M2
|
||||
so we bucket both in 1999-12-31"
|
||||
[{:keys [acc last-timestamp last-datemark]} {:keys [whisper-timestamp datemark] :as msg}]
|
||||
(cond
|
||||
(empty? acc) ; initial element
|
||||
{:last-timestamp whisper-timestamp
|
||||
:last-datemark datemark
|
||||
:acc (conj acc msg)}
|
||||
|
||||
(and (not= last-datemark datemark) ; not the same day
|
||||
(< whisper-timestamp last-timestamp)) ; not out-of-order
|
||||
{:last-timestamp whisper-timestamp
|
||||
:last-datemark datemark
|
||||
:acc (conj acc
|
||||
{:value last-datemark ; intersperse datemark message
|
||||
:type :datemark}
|
||||
msg)}
|
||||
:else
|
||||
{:last-timestamp (min whisper-timestamp last-timestamp) ; use last datemark
|
||||
:last-datemark last-datemark
|
||||
:acc (conj acc (assoc msg :datemark last-datemark))}))
|
||||
|
||||
(defn add-datemarks
|
||||
"Add a datemark in between an ordered seq of messages when two datemarks are not
|
||||
the same. Ignore messages with out-of-order timestamps"
|
||||
[messages]
|
||||
(when (seq messages)
|
||||
(let [messages-with-datemarks (:acc (reduce intersperse-datemark {:acc []} messages))]
|
||||
; Append last datemark
|
||||
(conj messages-with-datemarks
|
||||
{:value (:datemark (peek messages-with-datemarks))
|
||||
:type :datemark}))))
|
||||
|
||||
(defn last-gap
|
||||
"last-gap is a special gap that is put last in the message stream"
|
||||
[chat-id synced-from]
|
||||
{:message-id "0x123"
|
||||
:message-type constants/message-type-gap
|
||||
:chat-id chat-id
|
||||
:content-type constants/content-type-gap
|
||||
:gap-ids #{:first-gap}
|
||||
:gap-parameters {:from synced-from}})
|
||||
|
||||
(defn collapse-gaps
|
||||
"collapse-gaps will take an array of messages and collapse any gap next to
|
||||
each other in a single gap.
|
||||
It will also append one last gap if the last message is a non-gap"
|
||||
[messages chat-id synced-from now chat-type joined loading-messages?]
|
||||
(let [messages-with-gaps (reduce
|
||||
(fn [acc {:keys [gap-parameters message-id] :as message}]
|
||||
(let [last-element (peek acc)]
|
||||
(cond
|
||||
;; If it's a message, just add
|
||||
(empty? gap-parameters)
|
||||
(conj acc message)
|
||||
|
||||
;; Both are gaps, merge them
|
||||
(and
|
||||
(seq (:gap-parameters last-element))
|
||||
(seq gap-parameters))
|
||||
(conj (pop acc) (update last-element :gap-ids conj message-id))
|
||||
|
||||
;; it's a gap
|
||||
:else
|
||||
(conj acc (assoc message :gap-ids #{message-id})))))
|
||||
[]
|
||||
messages)]
|
||||
(if (or loading-messages? ; it's loading messages from the database
|
||||
(nil? synced-from) ; it's still syncing
|
||||
(= constants/timeline-chat-type chat-type) ; it's a timeline chat
|
||||
(= constants/profile-chat-type chat-type) ; it's a profile chat
|
||||
(and (not (nil? synced-from)) ; it's not more than a month
|
||||
(<= synced-from (- (quot now 1000) constants/one-month)))
|
||||
(and (= constants/private-group-chat-type chat-type) ; it's a private group chat
|
||||
(or (not (pos? joined)) ; we haven't joined
|
||||
(>= (quot joined 1000) synced-from))) ; the history goes before we joined
|
||||
(:gap-ids (peek messages-with-gaps))) ; there's already a gap on top of the chat history
|
||||
messages-with-gaps ; don't add an extra gap
|
||||
(conj messages-with-gaps (last-gap chat-id synced-from)))))
|
||||
@@ -1,44 +0,0 @@
|
||||
(ns status-im.chat.db-test
|
||||
(:require [cljs.test :refer-macros [deftest is testing]]
|
||||
[status-im.chat.db :as db]))
|
||||
|
||||
(deftest group-chat-name
|
||||
(testing "it prepends # if it's a public chat"
|
||||
(is (= "#withhash"
|
||||
(db/group-chat-name {:group-chat true
|
||||
:chat-id "1"
|
||||
:public? true
|
||||
:name "withhash"}))))
|
||||
(testing "it leaves the name unchanged if it's a group chat"
|
||||
(is (= "unchanged"
|
||||
(db/group-chat-name {:group-chat true
|
||||
:chat-id "1"
|
||||
:name "unchanged"})))))
|
||||
|
||||
(deftest intersperse-datemarks
|
||||
(testing "it mantains the order even when timestamps are across days"
|
||||
(let [message-1 {:datemark "Dec 31, 1999"
|
||||
:whisper-timestamp 946641600000} ; 1999}
|
||||
message-2 {:datemark "Jan 1, 2000"
|
||||
:whisper-timestamp 946728000000} ; 2000 this will displayed in 1999
|
||||
message-3 {:datemark "Dec 31, 1999"
|
||||
:whisper-timestamp 946641600000} ; 1999
|
||||
message-4 {:datemark "Jan 1, 2000"
|
||||
:whisper-timestamp 946728000000} ; 2000
|
||||
ordered-messages [message-4
|
||||
message-3
|
||||
message-2
|
||||
message-1]
|
||||
[m1 d1 m2 m3 m4 d2] (db/add-datemarks ordered-messages)]
|
||||
(is (= "Jan 1, 2000"
|
||||
(:datemark m1)))
|
||||
(is (= {:type :datemark
|
||||
:value "Jan 1, 2000"}
|
||||
d1))
|
||||
(is (= "Dec 31, 1999"
|
||||
(:datemark m2)
|
||||
(:datemark m3)
|
||||
(:datemark m4)))
|
||||
(is (= {:type :datemark
|
||||
:value "Dec 31, 1999"}
|
||||
d2)))))
|
||||
@@ -1,344 +1,12 @@
|
||||
(ns status-im.chat.models
|
||||
(:require [clojure.set :as set]
|
||||
[quo.design-system.colors :as colors]
|
||||
(:require [utils.i18n :as i18n]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.add-new.db :as new-public-chat.db]
|
||||
[status-im.chat.models.loading :as loading]
|
||||
[status-im2.contexts.chat.messages.list.events :as message-list]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im.data-store.chats :as chats-store]
|
||||
[status-im.data-store.contacts :as contacts-store]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.mailserver.core :as mailserver]
|
||||
[status-im.multiaccounts.model :as multiaccounts.model]
|
||||
[status-im2.contexts.chat.messages.list.state :as chat.state]
|
||||
[status-im.utils.clocks :as utils.clocks]
|
||||
[utils.re-frame :as rf]
|
||||
[status-im.utils.utils :as utils]
|
||||
[status-im2.contexts.chat.messages.delete-message-for-me.events :as delete-for-me]
|
||||
[status-im2.contexts.chat.messages.delete-message.events :as delete-message]
|
||||
[status-im2.navigation.events :as navigation]
|
||||
[taoensso.timbre :as log]))
|
||||
[taoensso.timbre :as log]
|
||||
[status-im.add-new.db :as new-public-chat.db]
|
||||
[status-im.data-store.chats :as chats-store]))
|
||||
|
||||
(defn- get-chat
|
||||
[cofx chat-id]
|
||||
(get-in cofx [:db :chats chat-id]))
|
||||
|
||||
(defn multi-user-chat?
|
||||
([chat]
|
||||
(:group-chat chat))
|
||||
([cofx chat-id]
|
||||
(multi-user-chat? (get-chat cofx chat-id))))
|
||||
|
||||
(def one-to-one-chat?
|
||||
(complement multi-user-chat?))
|
||||
|
||||
(defn public-chat?
|
||||
([chat]
|
||||
(:public? chat))
|
||||
([cofx chat-id]
|
||||
(public-chat? (get-chat cofx chat-id))))
|
||||
|
||||
(defn community-chat?
|
||||
([{:keys [chat-type]}]
|
||||
(= chat-type constants/community-chat-type))
|
||||
([cofx chat-id]
|
||||
(community-chat? (get-chat cofx chat-id))))
|
||||
|
||||
(defn active-chat?
|
||||
[cofx chat-id]
|
||||
(let [chat (get-chat cofx chat-id)]
|
||||
(:active chat)))
|
||||
|
||||
(defn foreground-chat?
|
||||
[{{:keys [current-chat-id view-id]} :db} chat-id]
|
||||
(and (= current-chat-id chat-id)
|
||||
(= view-id :chat)))
|
||||
|
||||
(defn group-chat?
|
||||
([chat]
|
||||
(and (multi-user-chat? chat)
|
||||
(not (public-chat? chat))))
|
||||
([cofx chat-id]
|
||||
(group-chat? (get-chat cofx chat-id))))
|
||||
|
||||
(defn timeline-chat?
|
||||
([chat]
|
||||
(:timeline? chat))
|
||||
([cofx chat-id]
|
||||
(timeline-chat? (get-chat cofx chat-id))))
|
||||
|
||||
(defn profile-chat?
|
||||
([chat]
|
||||
(:profile-public-key chat))
|
||||
([cofx chat-id]
|
||||
(profile-chat? (get-chat cofx chat-id))))
|
||||
|
||||
(defn set-chat-ui-props
|
||||
"Updates ui-props in active chat by merging provided kvs into them"
|
||||
[{:keys [current-chat-id] :as db} kvs]
|
||||
(update-in db [:chat-ui-props current-chat-id] merge kvs))
|
||||
|
||||
(defn- create-new-chat
|
||||
[chat-id {:keys [db now]}]
|
||||
(let [name (get-in db [:contacts/contacts chat-id :name])]
|
||||
{:chat-id chat-id
|
||||
:name (or name "")
|
||||
:color (rand-nth colors/chat-colors)
|
||||
:chat-type constants/one-to-one-chat-type
|
||||
:group-chat false
|
||||
:timestamp now
|
||||
:contacts #{chat-id}
|
||||
:last-clock-value 0}))
|
||||
|
||||
(defn map-chats
|
||||
[{:keys [db] :as cofx}]
|
||||
(fn [val]
|
||||
(assoc
|
||||
(merge
|
||||
(or (get (:chats db) (:chat-id val))
|
||||
(create-new-chat (:chat-id val) cofx))
|
||||
val)
|
||||
:invitation-admin
|
||||
(:invitation-admin val))))
|
||||
|
||||
(defn filter-chats
|
||||
[db]
|
||||
(fn [val]
|
||||
(and (not (get-in db [:chats (:chat-id val)])) (:public? val))))
|
||||
|
||||
(rf/defn leave-removed-chat
|
||||
[{{:keys [view-id current-chat-id chats]} :db
|
||||
:as cofx}]
|
||||
(when (and (= view-id :chat)
|
||||
(not (contains? chats current-chat-id)))
|
||||
(navigation/navigate-back cofx)))
|
||||
|
||||
(rf/defn ensure-chats
|
||||
"Add chats to db and update"
|
||||
[{:keys [db] :as cofx} chats]
|
||||
(let [{:keys [all-chats chats-home-list removed-chats]}
|
||||
(reduce
|
||||
(fn [acc {:keys [chat-id profile-public-key timeline? community-id active muted] :as chat}]
|
||||
(if (not (or active muted))
|
||||
(update acc :removed-chats conj chat-id)
|
||||
(cond-> acc
|
||||
(and (not profile-public-key) (not timeline?) (not community-id) active)
|
||||
(update :chats-home-list conj chat-id)
|
||||
:always
|
||||
(assoc-in [:all-chats chat-id] chat))))
|
||||
{:all-chats {}
|
||||
:chats-home-list #{}
|
||||
:removed-chats #{}}
|
||||
(map (map-chats cofx) chats))]
|
||||
(rf/merge
|
||||
cofx
|
||||
(merge {:db (-> db
|
||||
(update :chats merge all-chats)
|
||||
(update :chats-home-list set/union chats-home-list)
|
||||
(update :chats #(apply dissoc % removed-chats))
|
||||
(update :chats-home-list set/difference removed-chats))}
|
||||
(when (not-empty removed-chats)
|
||||
{:clear-message-notifications
|
||||
[removed-chats
|
||||
(get-in db [:multiaccount :remote-push-notifications-enabled?])]}))
|
||||
leave-removed-chat)))
|
||||
|
||||
(rf/defn clear-history
|
||||
"Clears history of the particular chat"
|
||||
[{:keys [db] :as cofx} chat-id remove-chat?]
|
||||
(let [{:keys [last-message public?
|
||||
deleted-at-clock-value]}
|
||||
(get-in db [:chats chat-id])
|
||||
last-message-clock-value (if (and public? remove-chat?)
|
||||
0
|
||||
(or (:clock-value last-message)
|
||||
deleted-at-clock-value
|
||||
(utils.clocks/send 0)))]
|
||||
{:db (-> db
|
||||
(assoc-in [:messages chat-id] {})
|
||||
(update-in [:message-lists] dissoc chat-id)
|
||||
(update :chats
|
||||
(fn [chats]
|
||||
(if (contains? chats chat-id)
|
||||
(update chats
|
||||
chat-id
|
||||
merge
|
||||
{:last-message nil
|
||||
:unviewed-messages-count 0
|
||||
:unviewed-mentions-count 0
|
||||
:deleted-at-clock-value last-message-clock-value})
|
||||
chats))))}))
|
||||
|
||||
(rf/defn clear-history-handler
|
||||
"Clears history of the particular chat"
|
||||
{:events [:chat.ui/clear-history]}
|
||||
[{:keys [db] :as cofx} chat-id remove-chat?]
|
||||
(rf/merge cofx
|
||||
{:db db
|
||||
:json-rpc/call [{:method "wakuext_clearHistory"
|
||||
:params [{:id chat-id}]
|
||||
:on-success #(re-frame/dispatch [::history-cleared chat-id %])
|
||||
:on-error #(log/error "failed to clear history " chat-id %)}]}
|
||||
(clear-history chat-id remove-chat?)))
|
||||
|
||||
(rf/defn chat-deactivated
|
||||
{:events [::chat-deactivated]}
|
||||
[_ chat-id]
|
||||
(log/debug "chat deactivated" chat-id))
|
||||
|
||||
(rf/defn deactivate-chat
|
||||
"Deactivate chat in db, no side effects"
|
||||
[{:keys [db now] :as cofx} chat-id]
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (-> (if (get-in db [:chats chat-id :muted])
|
||||
(assoc-in db [:chats chat-id :active] false)
|
||||
(update db :chats dissoc chat-id))
|
||||
(update :chats-home-list disj chat-id)
|
||||
(assoc :current-chat-id nil))
|
||||
:json-rpc/call [{:method "wakuext_deactivateChat"
|
||||
:params [{:id chat-id}]
|
||||
:on-success #(re-frame/dispatch [::chat-deactivated chat-id])
|
||||
:on-error #(log/error "failed to create public chat" chat-id %)}]}
|
||||
(clear-history chat-id true)))
|
||||
|
||||
(rf/defn offload-messages
|
||||
{:events [:offload-messages]}
|
||||
[{:keys [db]} chat-id]
|
||||
(merge {:db (-> db
|
||||
(update :messages dissoc chat-id)
|
||||
(update :message-lists dissoc chat-id)
|
||||
(update :pagination-info dissoc chat-id))}
|
||||
(when (and (= chat-id constants/timeline-chat-id) (= (:view-id db) :status))
|
||||
{:dispatch [:init-timeline-chat]})))
|
||||
|
||||
(rf/defn close-chat
|
||||
{:events [:close-chat]}
|
||||
[{:keys [db] :as cofx} navigate-to-shell?]
|
||||
(when-let [chat-id (:current-chat-id db)]
|
||||
(chat.state/reset-visible-item)
|
||||
(rf/merge cofx
|
||||
(merge
|
||||
{:db (dissoc db :current-chat-id)}
|
||||
(let [community-id (get-in db [:chats chat-id :community-id])]
|
||||
;; When navigating back from community chat to community, update switcher card
|
||||
(when (and community-id (not navigate-to-shell?))
|
||||
{:dispatch [:shell/add-switcher-card
|
||||
:community {:community-id community-id}]})))
|
||||
(delete-for-me/sync-all)
|
||||
(delete-message/send-all)
|
||||
(offload-messages chat-id))))
|
||||
|
||||
(rf/defn force-close-chat
|
||||
[{:keys [db] :as cofx} chat-id]
|
||||
(do
|
||||
(chat.state/reset-visible-item)
|
||||
(rf/merge cofx
|
||||
{:db (dissoc db :current-chat-id)}
|
||||
(offload-messages chat-id))))
|
||||
|
||||
(rf/defn remove-chat
|
||||
"Removes chat completely from app, producing all necessary effects for that"
|
||||
{:events [:chat.ui/remove-chat]}
|
||||
[{:keys [db now] :as cofx} chat-id]
|
||||
(rf/merge cofx
|
||||
{:clear-message-notifications
|
||||
[[chat-id] (get-in db [:multiaccount :remote-push-notifications-enabled?])]
|
||||
:dispatch [:shell/close-switcher-card chat-id]}
|
||||
(deactivate-chat chat-id)
|
||||
(offload-messages chat-id)))
|
||||
|
||||
(rf/defn show-more-chats
|
||||
{:events [:chat.ui/show-more-chats]}
|
||||
[{:keys [db]}]
|
||||
(when (< (:home-items-show-number db) (count (:chats db)))
|
||||
{:db (update db :home-items-show-number + 40)}))
|
||||
|
||||
(rf/defn preload-chat-data
|
||||
"Takes chat-id and coeffects map, returns effects necessary when navigating to chat"
|
||||
{:events [:chat.ui/preload-chat-data]}
|
||||
[cofx chat-id]
|
||||
(loading/load-messages cofx chat-id))
|
||||
|
||||
(rf/defn navigate-to-chat
|
||||
"Takes coeffects map and chat-id, returns effects necessary for navigation and preloading data"
|
||||
{:events [:chat.ui/navigate-to-chat]}
|
||||
[{db :db :as cofx} chat-id]
|
||||
(rf/merge cofx
|
||||
{:dispatch [:navigate-to :chat]}
|
||||
(navigation/change-tab :chat)
|
||||
(when-not (= (:view-id db) :community)
|
||||
(navigation/pop-to-root-tab :chat-stack))
|
||||
(close-chat false)
|
||||
(force-close-chat chat-id)
|
||||
(fn [{:keys [db]}]
|
||||
{:db (assoc db :current-chat-id chat-id)})
|
||||
(preload-chat-data chat-id)
|
||||
#(when (group-chat? cofx chat-id)
|
||||
(loading/load-chat % chat-id))))
|
||||
|
||||
(rf/defn navigate-to-chat-nav2
|
||||
"Takes coeffects map and chat-id, returns effects necessary for navigation and preloading data"
|
||||
{:events [:chat.ui/navigate-to-chat-nav2]}
|
||||
[{db :db :as cofx} chat-id from-shell?]
|
||||
(rf/merge cofx
|
||||
{:dispatch [:navigate-to-nav2 :chat chat-id from-shell?]}
|
||||
(when-not (= (:view-id db) :community)
|
||||
(navigation/pop-to-root-tab :shell-stack))
|
||||
(close-chat false)
|
||||
(force-close-chat chat-id)
|
||||
(fn [{:keys [db]}]
|
||||
{:db (assoc db :current-chat-id chat-id)})
|
||||
(preload-chat-data chat-id)
|
||||
#(when (group-chat? cofx chat-id)
|
||||
(loading/load-chat % chat-id))))
|
||||
|
||||
(rf/defn handle-clear-history-response
|
||||
{:events [::history-cleared]}
|
||||
[{:keys [db]} chat-id response]
|
||||
(let [chat (chats-store/<-rpc (first (:chats response)))]
|
||||
{:db (assoc-in db [:chats chat-id] chat)}))
|
||||
|
||||
(rf/defn handle-one-to-one-chat-created
|
||||
{:events [::one-to-one-chat-created]}
|
||||
[{:keys [db]} chat-id response]
|
||||
(let [chat (chats-store/<-rpc (first (:chats response)))
|
||||
contact-rpc (first (:contacts response))
|
||||
contact (when contact-rpc (contacts-store/<-rpc contact-rpc))]
|
||||
{:db (cond-> db
|
||||
contact
|
||||
(assoc-in [:contacts/contacts chat-id] contact)
|
||||
:always
|
||||
(assoc-in [:chats chat-id] chat)
|
||||
:always
|
||||
(update :chats-home-list conj chat-id))
|
||||
:dispatch [:chat.ui/navigate-to-chat-nav2 chat-id]}))
|
||||
|
||||
(rf/defn navigate-to-user-pinned-messages
|
||||
"Takes coeffects map and chat-id, returns effects necessary for navigation and preloading data"
|
||||
{:events [:chat.ui/navigate-to-pinned-messages]}
|
||||
[cofx chat-id]
|
||||
(navigation/navigate-to cofx :chat-pinned-messages {:chat-id chat-id}))
|
||||
|
||||
(rf/defn start-chat
|
||||
"Start a chat, making sure it exists"
|
||||
{:events [:chat.ui/start-chat]}
|
||||
[{:keys [db] :as cofx} chat-id ens-name]
|
||||
;; don't allow to open chat with yourself
|
||||
(when (not= (multiaccounts.model/current-public-key cofx) chat-id)
|
||||
{:json-rpc/call [{:method "wakuext_createOneToOneChat"
|
||||
:params [{:id chat-id :ensName ens-name}]
|
||||
:on-success #(re-frame/dispatch [::one-to-one-chat-created chat-id %])
|
||||
:on-error #(log/error "failed to create one-to-on chat" chat-id %)}]}))
|
||||
|
||||
(defn profile-chat-topic
|
||||
[public-key]
|
||||
(str "@" public-key))
|
||||
|
||||
(defn my-profile-chat-topic
|
||||
[db]
|
||||
(profile-chat-topic (get-in db [:multiaccount :public-key])))
|
||||
;; OLD
|
||||
|
||||
(rf/defn handle-public-chat-created
|
||||
{:events [::public-chat-created]}
|
||||
@@ -346,7 +14,7 @@
|
||||
{:db (-> db
|
||||
(assoc-in [:chats chat-id] (chats-store/<-rpc (first (:chats response))))
|
||||
(update :chats-home-list conj chat-id))
|
||||
:dispatch [:chat.ui/navigate-to-chat chat-id]})
|
||||
:dispatch [:chat/navigate-to-chat chat-id]})
|
||||
|
||||
(rf/defn create-public-chat-go
|
||||
[_ chat-id]
|
||||
@@ -360,174 +28,8 @@
|
||||
{:events [:chat.ui/start-public-chat]}
|
||||
[cofx topic]
|
||||
(if (new-public-chat.db/valid-topic? topic)
|
||||
(if (active-chat? cofx topic)
|
||||
(navigate-to-chat cofx topic)
|
||||
(create-public-chat-go
|
||||
cofx
|
||||
topic))
|
||||
(create-public-chat-go
|
||||
cofx
|
||||
topic)
|
||||
{:utils/show-popup {:title (i18n/label :t/cant-open-public-chat)
|
||||
:content (i18n/label :t/invalid-public-chat-topic)}}))
|
||||
|
||||
(rf/defn profile-chat-created
|
||||
{:events [::profile-chat-created]}
|
||||
[{:keys [db] :as cofx} chat-id response navigate-to?]
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db db}
|
||||
#(when response
|
||||
(let [chat (chats-store/<-rpc (first (:chats response)))]
|
||||
{:db (assoc-in db [:chats chat-id] chat)}))
|
||||
#(when navigate-to?
|
||||
{:dispatch-n [[:chat.ui/preload-chat-data chat-id]
|
||||
[:open-modal :profile]]})))
|
||||
|
||||
(rf/defn start-profile-chat
|
||||
"Starts a new profile chat"
|
||||
{:events [:start-profile-chat]}
|
||||
[cofx profile-public-key navigate-to?]
|
||||
(let [chat-id (profile-chat-topic profile-public-key)]
|
||||
(if (active-chat? cofx chat-id)
|
||||
{:dispatch [::profile-chat-created chat-id nil navigate-to?]}
|
||||
{:json-rpc/call [{:method "wakuext_createProfileChat"
|
||||
:params [{:id profile-public-key}]
|
||||
:on-success #(re-frame/dispatch [::profile-chat-created chat-id % navigate-to?])
|
||||
:on-error #(log/error "failed to create profile chat" chat-id %)}]})))
|
||||
|
||||
(rf/defn disable-chat-cooldown
|
||||
"Turns off chat cooldown (protection against message spamming)"
|
||||
{:events [:chat/disable-cooldown]}
|
||||
[{:keys [db]}]
|
||||
{:db (assoc db :chat/cooldown-enabled? false)})
|
||||
|
||||
;; effects
|
||||
(re-frame/reg-fx
|
||||
:show-cooldown-warning
|
||||
(fn [_]
|
||||
(utils/show-popup nil
|
||||
(i18n/label :cooldown/warning-message)
|
||||
#())))
|
||||
|
||||
(rf/defn mute-chat-failed
|
||||
{:events [::mute-chat-failed]}
|
||||
[{:keys [db] :as cofx} chat-id muted? error]
|
||||
(log/error "mute chat failed" chat-id error)
|
||||
{:db (assoc-in db [:chats chat-id :muted] (not muted?))})
|
||||
|
||||
(rf/defn mute-chat-toggled-successfully
|
||||
{:events [::mute-chat-toggled-successfully]}
|
||||
[_ chat-id]
|
||||
(log/debug "muted chat successfully" chat-id))
|
||||
|
||||
(rf/defn mute-chat
|
||||
{:events [::mute-chat-toggled]}
|
||||
[{:keys [db] :as cofx} chat-id muted?]
|
||||
(let [method (if muted? "wakuext_muteChat" "wakuext_unmuteChat")]
|
||||
{:db (assoc-in db [:chats chat-id :muted] muted?)
|
||||
:json-rpc/call [{:method method
|
||||
:params [chat-id]
|
||||
:on-error #(re-frame/dispatch [::mute-chat-failed chat-id muted? %])
|
||||
:on-success #(re-frame/dispatch [::mute-chat-toggled-successfully chat-id])}]}))
|
||||
|
||||
(rf/defn show-profile
|
||||
{:events [:chat.ui/show-profile]}
|
||||
[{:keys [db] :as cofx} identity ens-name]
|
||||
(let [my-public-key (get-in db [:multiaccount :public-key])]
|
||||
(when (not= my-public-key identity)
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (-> db
|
||||
(assoc :contacts/identity identity)
|
||||
(assoc :contacts/ens-name ens-name))}
|
||||
(start-profile-chat identity true)))))
|
||||
|
||||
(rf/defn clear-history-pressed
|
||||
{:events [:chat.ui/clear-history-pressed]}
|
||||
[_ chat-id]
|
||||
{:ui/show-confirmation
|
||||
{:title (i18n/label :t/clear-history-title)
|
||||
:content (i18n/label :t/clear-history-confirmation-content)
|
||||
:confirm-button-text (i18n/label :t/clear-history-action)
|
||||
:on-accept #(do
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch [:chat.ui/clear-history chat-id false]))}})
|
||||
|
||||
(rf/defn gaps-failed
|
||||
{:events [::gaps-failed]}
|
||||
[{:keys [db]} chat-id gap-ids error]
|
||||
(log/error "failed to fetch gaps" chat-id gap-ids error)
|
||||
{:db (dissoc db :mailserver/fetching-gaps-in-progress)})
|
||||
|
||||
(rf/defn sync-chat-from-sync-from-failed
|
||||
{:events [::sync-chat-from-sync-from-failed]}
|
||||
[{:keys [db]} chat-id error]
|
||||
(log/error "failed to sync chat" chat-id error)
|
||||
{:db (dissoc db :mailserver/fetching-gaps-in-progress)})
|
||||
|
||||
(rf/defn sync-chat-from-sync-from-success
|
||||
{:events [::sync-chat-from-sync-from-success]}
|
||||
[{:keys [db] :as cofx} chat-id synced-from]
|
||||
(log/debug "synced success" chat-id synced-from)
|
||||
{:db
|
||||
(-> db
|
||||
(assoc-in [:chats chat-id :synced-from] synced-from)
|
||||
(dissoc :mailserver/fetching-gaps-in-progress))})
|
||||
|
||||
(rf/defn gaps-filled
|
||||
{:events [::gaps-filled]}
|
||||
[{:keys [db] :as cofx} chat-id message-ids]
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (-> db
|
||||
(update-in [:messages chat-id] (fn [messages] (apply dissoc messages message-ids)))
|
||||
(dissoc :mailserver/fetching-gaps-in-progress))}
|
||||
(message-list/rebuild-message-list chat-id)))
|
||||
|
||||
(rf/defn fill-gaps
|
||||
[cofx chat-id gap-ids]
|
||||
{:json-rpc/call [{:method "wakuext_fillGaps"
|
||||
:params [chat-id gap-ids]
|
||||
:on-success #(re-frame/dispatch [::gaps-filled chat-id gap-ids %])
|
||||
:on-error #(re-frame/dispatch [::gaps-failed chat-id gap-ids %])}]})
|
||||
|
||||
(rf/defn sync-chat-from-sync-from
|
||||
[cofx chat-id]
|
||||
(log/debug "syncing chat from sync from")
|
||||
{:json-rpc/call [{:method "wakuext_syncChatFromSyncedFrom"
|
||||
:params [chat-id]
|
||||
:on-success #(re-frame/dispatch [::sync-chat-from-sync-from-success chat-id %])
|
||||
:on-error #(re-frame/dispatch [::sync-chat-from-sync-from-failed chat-id %])}]})
|
||||
|
||||
(rf/defn chat-ui-fill-gaps
|
||||
{:events [:chat.ui/fill-gaps]}
|
||||
[{:keys [db] :as cofx} chat-id gap-ids]
|
||||
(let [use-status-nodes? (mailserver/fetch-use-mailservers? {:db db})]
|
||||
(log/info "filling gaps if use-status-nodes = true" chat-id gap-ids)
|
||||
(when use-status-nodes?
|
||||
(rf/merge cofx
|
||||
{:db (assoc db :mailserver/fetching-gaps-in-progress gap-ids)}
|
||||
(if (= gap-ids #{:first-gap})
|
||||
(sync-chat-from-sync-from chat-id)
|
||||
(fill-gaps chat-id gap-ids))))))
|
||||
|
||||
(rf/defn chat-ui-remove-chat-pressed
|
||||
{:events [:chat.ui/remove-chat-pressed]}
|
||||
[_ chat-id]
|
||||
{:ui/show-confirmation
|
||||
{:title (i18n/label :t/delete-confirmation)
|
||||
:content (i18n/label :t/delete-chat-confirmation)
|
||||
:confirm-button-text (i18n/label :t/delete)
|
||||
:on-accept #(do
|
||||
(re-frame/dispatch [:bottom-sheet/hide])
|
||||
(re-frame/dispatch [:chat.ui/remove-chat chat-id]))}})
|
||||
|
||||
(rf/defn decrease-unviewed-count
|
||||
{:events [:chat/decrease-unviewed-count]}
|
||||
[{:keys [db]} chat-id {:keys [count countWithMentions]}]
|
||||
{:db (-> db
|
||||
;; There might be some other requests being fired,
|
||||
;; so we need to make sure the count has not been set to
|
||||
;; 0 in the meantime
|
||||
(update-in [:chats chat-id :unviewed-messages-count]
|
||||
#(max (- % count) 0))
|
||||
(update-in [:chats chat-id :unviewed-mentions-count]
|
||||
#(max (- % countWithMentions) 0)))})
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
(ns status-im.chat.models.gaps
|
||||
(:require [utils.re-frame :as rf]
|
||||
[taoensso.timbre :as log]
|
||||
[status-im2.contexts.chat.messages.list.events :as message-list]
|
||||
[status-im.mailserver.core :as mailserver]))
|
||||
|
||||
(rf/defn gaps-filled
|
||||
{:events [:gaps/filled]}
|
||||
[{:keys [db] :as cofx} chat-id message-ids]
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (-> db
|
||||
(update-in [:messages chat-id] (fn [messages] (apply dissoc messages message-ids)))
|
||||
(dissoc :mailserver/fetching-gaps-in-progress))}
|
||||
(message-list/rebuild-message-list chat-id)))
|
||||
|
||||
(rf/defn gaps-failed
|
||||
{:events [:gaps/failed]}
|
||||
[{:keys [db]} chat-id gap-ids error]
|
||||
(log/error "failed to fetch gaps" chat-id gap-ids error)
|
||||
{:db (dissoc db :mailserver/fetching-gaps-in-progress)})
|
||||
|
||||
(rf/defn sync-chat-from-sync-from-failed
|
||||
{:events [::sync-chat-from-sync-from-failed]}
|
||||
[{:keys [db]} chat-id error]
|
||||
(log/error "failed to sync chat" chat-id error)
|
||||
{:db (dissoc db :mailserver/fetching-gaps-in-progress)})
|
||||
|
||||
(rf/defn sync-chat-from-sync-from-success
|
||||
{:events [::sync-chat-from-sync-from-success]}
|
||||
[{:keys [db] :as cofx} chat-id synced-from]
|
||||
(log/debug "synced success" chat-id synced-from)
|
||||
{:db
|
||||
(-> db
|
||||
(assoc-in [:chats chat-id :synced-from] synced-from)
|
||||
(dissoc :mailserver/fetching-gaps-in-progress))})
|
||||
|
||||
(rf/defn fill-gaps
|
||||
[_ chat-id gap-ids]
|
||||
{:json-rpc/call [{:method "wakuext_fillGaps"
|
||||
:params [chat-id gap-ids]
|
||||
:on-success #(rf/dispatch [:gaps/filled chat-id gap-ids %])
|
||||
:on-error #(rf/dispatch [:gaps/failed chat-id gap-ids %])}]})
|
||||
|
||||
(rf/defn sync-chat-from-sync-from
|
||||
[_ chat-id]
|
||||
(log/debug "syncing chat from sync from")
|
||||
{:json-rpc/call [{:method "wakuext_syncChatFromSyncedFrom"
|
||||
:params [chat-id]
|
||||
:on-success #(rf/dispatch [::sync-chat-from-sync-from-success chat-id %])
|
||||
:on-error #(rf/dispatch [::sync-chat-from-sync-from-failed chat-id %])}]})
|
||||
|
||||
(rf/defn chat-ui-fill-gaps
|
||||
{:events [:chat.ui/fill-gaps]}
|
||||
[{:keys [db] :as cofx} chat-id gap-ids]
|
||||
(let [use-status-nodes? (mailserver/fetch-use-mailservers? {:db db})]
|
||||
(log/info "filling gaps if use-status-nodes = true" chat-id gap-ids)
|
||||
(when use-status-nodes?
|
||||
(rf/merge cofx
|
||||
{:db (assoc db :mailserver/fetching-gaps-in-progress gap-ids)}
|
||||
(if (= gap-ids #{:first-gap})
|
||||
(sync-chat-from-sync-from chat-id)
|
||||
(fill-gaps chat-id gap-ids))))))
|
||||
@@ -3,7 +3,6 @@
|
||||
["react-native-blob-util" :default ReactNativeBlobUtil]
|
||||
[clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.chat.models :as chat]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.ui.components.permissions :as permissions]
|
||||
[status-im.ui.components.react :as react]
|
||||
@@ -98,10 +97,10 @@
|
||||
|
||||
(re-frame/reg-fx
|
||||
::image-selected
|
||||
(fn [[uri chat-id]]
|
||||
(fn [[image chat-id]]
|
||||
(resize-and-call
|
||||
uri
|
||||
#(re-frame/dispatch [:chat.ui/image-selected chat-id uri %]))))
|
||||
(:uri image)
|
||||
#(re-frame/dispatch [:chat.ui/image-selected chat-id image %]))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
::camera-roll-get-photos
|
||||
@@ -112,9 +111,18 @@
|
||||
(-> (if end-cursor
|
||||
(.getPhotos
|
||||
CameraRoll
|
||||
#js {:first num :after end-cursor :assetType "Photos" :groupTypes "All"})
|
||||
#js
|
||||
{:first num
|
||||
:after end-cursor
|
||||
:assetType "Photos"
|
||||
:groupTypes "All"
|
||||
:include (clj->js ["imageSize"])})
|
||||
(.getPhotos CameraRoll
|
||||
#js {:first num :assetType "Photos" :groupTypes "All"}))
|
||||
#js
|
||||
{:first num
|
||||
:assetType "Photos"
|
||||
:groupTypes "All"
|
||||
:include (clj->js ["imageSize"])}))
|
||||
(.then #(let [response (types/js->clj %)]
|
||||
(re-frame/dispatch [:on-camera-roll-get-photos (:edges response)
|
||||
(:page_info response) end-cursor])))
|
||||
@@ -151,7 +159,7 @@
|
||||
[{:keys [db] :as cofx} photos page-info end-cursor]
|
||||
(let [photos_x (when end-cursor (:camera-roll/photos db))]
|
||||
{:db (-> db
|
||||
(assoc :camera-roll/photos (concat photos_x (map #(get-in % [:node :image :uri]) photos)))
|
||||
(assoc :camera-roll/photos (concat photos_x (map #(get-in % [:node :image]) photos)))
|
||||
(assoc :camera-roll/end-cursor (:end_cursor page-info))
|
||||
(assoc :camera-roll/has-next-page (:has_next_page page-info))
|
||||
(assoc :camera-roll/loading-more false))}))
|
||||
@@ -167,21 +175,17 @@
|
||||
(let [current-chat-id (or chat-id (:current-chat-id db))]
|
||||
(clear-sending-images cofx current-chat-id)))
|
||||
|
||||
(rf/defn cancel-sending-image-timeline
|
||||
{:events [:chat.ui/cancel-sending-image-timeline]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(cancel-sending-image cofx (chat/my-profile-chat-topic db)))
|
||||
|
||||
(rf/defn image-selected
|
||||
{:events [:chat.ui/image-selected]}
|
||||
[{:keys [db]} current-chat-id original uri]
|
||||
{:db (update-in db [:chat/inputs current-chat-id :metadata :sending-image original] merge {:uri uri})})
|
||||
{:db
|
||||
(update-in db [:chat/inputs current-chat-id :metadata :sending-image uri] merge original {:uri uri})})
|
||||
|
||||
(rf/defn image-unselected
|
||||
{:events [:chat.ui/image-unselected]}
|
||||
[{:keys [db]} original]
|
||||
(let [current-chat-id (:current-chat-id db)]
|
||||
{:db (update-in db [:chat/inputs current-chat-id :metadata :sending-image] dissoc original)}))
|
||||
{:db (update-in db [:chat/inputs current-chat-id :metadata :sending-image] dissoc (:uri original))}))
|
||||
|
||||
(rf/defn chat-open-image-picker
|
||||
{:events [:chat.ui/open-image-picker]}
|
||||
@@ -191,11 +195,6 @@
|
||||
(when (< (count images) config/max-images-batch)
|
||||
{::chat-open-image-picker current-chat-id})))
|
||||
|
||||
(rf/defn chat-open-image-picker-timeline
|
||||
{:events [:chat.ui/open-image-picker-timeline]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(chat-open-image-picker cofx (chat/my-profile-chat-topic db)))
|
||||
|
||||
(rf/defn chat-show-image-picker-camera
|
||||
{:events [:chat.ui/show-image-picker-camera]}
|
||||
[{:keys [db]} chat-id]
|
||||
@@ -204,27 +203,17 @@
|
||||
(when (< (count images) config/max-images-batch)
|
||||
{::chat-open-image-picker-camera current-chat-id})))
|
||||
|
||||
(rf/defn chat-show-image-picker-camera-timeline
|
||||
{:events [:chat.ui/show-image-picker-camera-timeline]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(chat-show-image-picker-camera cofx (chat/my-profile-chat-topic db)))
|
||||
|
||||
(rf/defn camera-roll-pick
|
||||
{:events [:chat.ui/camera-roll-pick]}
|
||||
[{:keys [db]} uri chat-id]
|
||||
[{:keys [db]} image chat-id]
|
||||
(let [current-chat-id (or chat-id (:current-chat-id db))
|
||||
images (get-in db [:chat/inputs current-chat-id :metadata :sending-image])]
|
||||
(if (get-in db [:chats current-chat-id :timeline?])
|
||||
{:db (assoc-in db [:chat/inputs current-chat-id :metadata :sending-image] {})
|
||||
::image-selected [uri current-chat-id]}
|
||||
::image-selected [image current-chat-id]}
|
||||
(when (and (< (count images) config/max-images-batch)
|
||||
(not (get images uri)))
|
||||
{::image-selected [uri current-chat-id]}))))
|
||||
|
||||
(rf/defn camera-roll-pick-timeline
|
||||
{:events [:chat.ui/camera-roll-pick-timeline]}
|
||||
[{:keys [db] :as cofx} uri]
|
||||
(camera-roll-pick cofx uri (chat/my-profile-chat-topic db)))
|
||||
(not (some #(= (:uri image) (:uri %)) images)))
|
||||
{::image-selected [image current-chat-id]}))))
|
||||
|
||||
(rf/defn save-image-to-gallery
|
||||
{:events [:chat.ui/save-image-to-gallery]}
|
||||
|
||||
@@ -3,14 +3,12 @@
|
||||
[clojure.string :as string]
|
||||
[goog.object :as object]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.chat.models :as chat]
|
||||
[status-im.chat.models.mentions :as mentions]
|
||||
[status-im.chat.models.message :as chat.message]
|
||||
[status-im.chat.models.message-content :as message-content]
|
||||
[status-im2.constants :as constants]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.datetime :as datetime]
|
||||
[status-im.utils.utils :as utils]
|
||||
[taoensso.timbre :as log]
|
||||
[status-im.ui.screens.chat.components.input :as input]))
|
||||
@@ -25,6 +23,14 @@
|
||||
(.-char ^js emoji-map)
|
||||
original))))
|
||||
|
||||
;; effects
|
||||
(re-frame/reg-fx
|
||||
:show-cooldown-warning
|
||||
(fn [_]
|
||||
(utils/show-popup nil
|
||||
(i18n/label :cooldown/warning-message)
|
||||
#())))
|
||||
|
||||
(rf/defn set-chat-input-text
|
||||
"Set input text for current-chat. Takes db and input text and cofx
|
||||
as arguments and returns new fx. Always clear all validation messages."
|
||||
@@ -33,13 +39,6 @@
|
||||
(let [current-chat-id (or chat-id (:current-chat-id db))]
|
||||
{:db (assoc-in db [:chat/inputs current-chat-id :input-text] (text->emoji new-input))}))
|
||||
|
||||
(rf/defn set-timeline-input-text
|
||||
{:events [:chat.ui/set-timeline-input-text]}
|
||||
[{db :db} new-input]
|
||||
{:db (assoc-in db
|
||||
[:chat/inputs (chat/my-profile-chat-topic db) :input-text]
|
||||
(text->emoji new-input))})
|
||||
|
||||
(rf/defn select-mention
|
||||
{:events [:chat.ui/select-mention]}
|
||||
[{:keys [db] :as cofx} text-input-ref {:keys [alias name searched-text match] :as user}]
|
||||
@@ -74,45 +73,11 @@
|
||||
:end end}))
|
||||
(mentions/recheck-at-idxs {alias user}))))
|
||||
|
||||
(defn- start-cooldown
|
||||
[{:keys [db]} cooldowns]
|
||||
{:dispatch-later [{:dispatch [:chat/disable-cooldown]
|
||||
:ms (constants/cooldown-periods-ms
|
||||
cooldowns
|
||||
constants/default-cooldown-period-ms)}]
|
||||
:show-cooldown-warning nil
|
||||
:db (assoc db
|
||||
:chat/cooldowns (if
|
||||
(=
|
||||
constants/cooldown-reset-threshold
|
||||
cooldowns)
|
||||
0
|
||||
cooldowns)
|
||||
:chat/spam-messages-frequency 0
|
||||
:chat/cooldown-enabled? true)})
|
||||
|
||||
(rf/defn process-cooldown
|
||||
"Process cooldown to protect against message spammers"
|
||||
[{{:keys [chat/last-outgoing-message-sent-at
|
||||
chat/cooldowns
|
||||
chat/spam-messages-frequency
|
||||
current-chat-id]
|
||||
:as db}
|
||||
:db
|
||||
:as cofx}]
|
||||
(when (chat/public-chat? cofx current-chat-id)
|
||||
(let [spamming-fast? (< (- (datetime/timestamp) last-outgoing-message-sent-at)
|
||||
(+ constants/spam-interval-ms (* 1000 cooldowns)))
|
||||
spamming-frequently? (= constants/spam-message-frequency-threshold
|
||||
spam-messages-frequency)]
|
||||
(cond-> {:db (assoc db
|
||||
:chat/last-outgoing-message-sent-at (datetime/timestamp)
|
||||
:chat/spam-messages-frequency (if spamming-fast?
|
||||
(inc spam-messages-frequency)
|
||||
0))}
|
||||
|
||||
(and spamming-fast? spamming-frequently?)
|
||||
(start-cooldown (inc cooldowns))))))
|
||||
(rf/defn disable-chat-cooldown
|
||||
"Turns off chat cooldown (protection against message spamming)"
|
||||
{:events [:chat/disable-cooldown]}
|
||||
[{:keys [db]}]
|
||||
{:db (assoc db :chat/cooldown-enabled? false)})
|
||||
|
||||
(rf/defn reply-to-message
|
||||
"Sets reference to previous chat message and focuses on input"
|
||||
@@ -182,15 +147,20 @@
|
||||
:ens-name preferred-name})))
|
||||
|
||||
(defn build-image-messages
|
||||
[{db :db} chat-id]
|
||||
[{db :db} chat-id input-text]
|
||||
(let [images (get-in db [:chat/inputs chat-id :metadata :sending-image])
|
||||
album-id (str (random-uuid))]
|
||||
(mapv (fn [[_ {:keys [uri]}]]
|
||||
(mapv (fn [[_ {:keys [uri width height]}]]
|
||||
{:chat-id chat-id
|
||||
:album-id album-id
|
||||
:content-type constants/content-type-image
|
||||
:image-path (utils/safe-replace uri #"file://" "")
|
||||
:text (i18n/label :t/update-to-see-image {"locale" "en"})})
|
||||
:image-width width
|
||||
:image-height height
|
||||
;; TODO: message not received if text field is
|
||||
;; nil or empty, issue:
|
||||
;; https://github.com/status-im/status-mobile/issues/14754
|
||||
:text (or input-text "placeholder")})
|
||||
images)))
|
||||
|
||||
(rf/defn clean-input
|
||||
@@ -216,27 +186,13 @@
|
||||
|
||||
(rf/defn send-messages
|
||||
[{:keys [db] :as cofx} input-text current-chat-id]
|
||||
(let [image-messages (build-image-messages cofx current-chat-id)
|
||||
text-message (build-text-message cofx input-text current-chat-id)
|
||||
(let [image-messages (build-image-messages cofx current-chat-id input-text)
|
||||
text-message (when-not (seq image-messages)
|
||||
(build-text-message cofx input-text current-chat-id))
|
||||
messages (keep identity (conj image-messages text-message))]
|
||||
(when (seq messages)
|
||||
(rf/merge cofx
|
||||
(clean-input (:current-chat-id db))
|
||||
(process-cooldown)
|
||||
(chat.message/send-messages messages)))))
|
||||
|
||||
(rf/defn send-my-status-message
|
||||
"when not empty, proceed by sending text message with public key topic"
|
||||
{:events [:profile.ui/send-my-status-message]}
|
||||
[{db :db :as cofx}]
|
||||
(let [current-chat-id (chat/my-profile-chat-topic db)
|
||||
{:keys [input-text]} (get-in db [:chat/inputs current-chat-id])
|
||||
image-messages (build-image-messages cofx current-chat-id)
|
||||
text-message (build-text-message cofx input-text current-chat-id)
|
||||
messages (keep identity (conj image-messages text-message))]
|
||||
(when (seq messages)
|
||||
(rf/merge cofx
|
||||
(clean-input current-chat-id)
|
||||
(chat.message/send-messages messages)))))
|
||||
|
||||
(rf/defn send-audio-message
|
||||
@@ -274,8 +230,7 @@
|
||||
:js-response true
|
||||
:on-error #(log/error "failed to edit message " %)
|
||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])}]}
|
||||
(cancel-message-edit)
|
||||
(process-cooldown)))
|
||||
(cancel-message-edit)))
|
||||
|
||||
(rf/defn send-current-message
|
||||
"Sends message from current chat input"
|
||||
@@ -304,8 +259,7 @@
|
||||
:on-success #(re-frame/dispatch [:transport/message-sent %])}]}
|
||||
(mentions/clear-mentions)
|
||||
(mentions/clear-cursor)
|
||||
(clean-input (:current-chat-id db))
|
||||
(process-cooldown)))
|
||||
(clean-input (:current-chat-id db))))
|
||||
|
||||
(rf/defn cancel-contact-request
|
||||
"Cancels contact request"
|
||||
@@ -316,8 +270,7 @@
|
||||
{:db (assoc-in db [:chat/inputs current-chat-id :metadata :sending-contact-request] nil)}
|
||||
(mentions/clear-mentions)
|
||||
(mentions/clear-cursor)
|
||||
(clean-input (:current-chat-id db))
|
||||
(process-cooldown))))
|
||||
(clean-input (:current-chat-id db)))))
|
||||
|
||||
(rf/defn chat-send-sticker
|
||||
{:events [:chat/send-sticker]}
|
||||
|
||||
@@ -1,79 +1,9 @@
|
||||
(ns status-im.chat.models.input-test
|
||||
(:require [cljs.test :refer-macros [deftest is testing]]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im.chat.models.input :as input]
|
||||
[utils.datetime :as datetime]))
|
||||
(:require [cljs.test :refer-macros [deftest is]]
|
||||
[status-im.chat.models.input :as input]))
|
||||
|
||||
(deftest text->emoji
|
||||
(is (nil? (input/text->emoji nil)))
|
||||
(is (= "" (input/text->emoji "")))
|
||||
(is (= "test" (input/text->emoji "test")))
|
||||
(is (= "word1 \uD83D\uDC4D word2" (input/text->emoji "word1 :+1: word2"))))
|
||||
|
||||
(deftest process-cooldown-fx
|
||||
(let [db {:current-chat-id "chat"
|
||||
:chats {"chat" {:public? true}}
|
||||
:chat/cooldowns 0
|
||||
:chat/spam-messages-frequency 0
|
||||
:chat/cooldown-enabled? false}]
|
||||
(with-redefs [datetime/timestamp (constantly 1527675198542)]
|
||||
(testing "no spamming detected"
|
||||
(let [expected {:db (assoc db :chat/last-outgoing-message-sent-at 1527675198542)}
|
||||
actual (input/process-cooldown {:db db})]
|
||||
(is (= expected actual))))
|
||||
|
||||
(testing "spamming detected in 1-1"
|
||||
(let [db (assoc db
|
||||
:chats {"chat" {:public? false}}
|
||||
:chat/spam-messages-frequency constants/spam-message-frequency-threshold
|
||||
:chat/last-outgoing-message-sent-at (- 1527675198542 900))
|
||||
expected nil
|
||||
actual (input/process-cooldown {:db db})]
|
||||
(is (= expected actual))))
|
||||
|
||||
(testing "spamming detected"
|
||||
(let [db (assoc db
|
||||
:chat/last-outgoing-message-sent-at (- 1527675198542 900)
|
||||
:chat/spam-messages-frequency constants/spam-message-frequency-threshold)
|
||||
expected {:db (assoc db
|
||||
:chat/last-outgoing-message-sent-at 1527675198542
|
||||
:chat/cooldowns 1
|
||||
:chat/spam-messages-frequency 0
|
||||
:chat/cooldown-enabled? true)
|
||||
:show-cooldown-warning nil
|
||||
:dispatch-later [{:dispatch [:chat/disable-cooldown]
|
||||
:ms (constants/cooldown-periods-ms 1)}]}
|
||||
actual (input/process-cooldown {:db db})]
|
||||
(is (= expected actual))))
|
||||
|
||||
(testing "spamming detected twice"
|
||||
(let [db (assoc db
|
||||
:chat/cooldowns 1
|
||||
:chat/last-outgoing-message-sent-at (- 1527675198542 900)
|
||||
:chat/spam-messages-frequency constants/spam-message-frequency-threshold)
|
||||
expected {:db (assoc db
|
||||
:chat/last-outgoing-message-sent-at 1527675198542
|
||||
:chat/cooldowns 2
|
||||
:chat/spam-messages-frequency 0
|
||||
:chat/cooldown-enabled? true)
|
||||
:show-cooldown-warning nil
|
||||
:dispatch-later [{:dispatch [:chat/disable-cooldown]
|
||||
:ms (constants/cooldown-periods-ms 2)}]}
|
||||
actual (input/process-cooldown {:db db})]
|
||||
(is (= expected actual))))
|
||||
|
||||
(testing "spamming reaching cooldown threshold"
|
||||
(let [db (assoc db
|
||||
:chat/cooldowns (dec constants/cooldown-reset-threshold)
|
||||
:chat/last-outgoing-message-sent-at (- 1527675198542 900)
|
||||
:chat/spam-messages-frequency constants/spam-message-frequency-threshold)
|
||||
expected {:db (assoc db
|
||||
:chat/last-outgoing-message-sent-at 1527675198542
|
||||
:chat/cooldowns 0
|
||||
:chat/spam-messages-frequency 0
|
||||
:chat/cooldown-enabled? true)
|
||||
:show-cooldown-warning nil
|
||||
:dispatch-later [{:dispatch [:chat/disable-cooldown]
|
||||
:ms (constants/cooldown-periods-ms 3)}]}
|
||||
actual (input/process-cooldown {:db db})]
|
||||
(is (= expected actual)))))))
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
[status-im2.constants :as constants]
|
||||
[status-im.data-store.chats :as data-store.chats]
|
||||
[status-im.data-store.messages :as data-store.messages]
|
||||
[status-im2.contexts.activity-center.events :as activity-center]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
@@ -65,19 +64,20 @@
|
||||
assoc
|
||||
:unviewed-messages-count 0
|
||||
:unviewed-mentions-count 0
|
||||
:unviewed-replies-count 0
|
||||
:highlight false))
|
||||
|
||||
(rf/defn handle-mark-all-read-successful
|
||||
{:events [::mark-all-read-successful]}
|
||||
[cofx]
|
||||
(activity-center/notifications-fetch-unread-count cofx))
|
||||
[_]
|
||||
{:dispatch [:activity-center.notifications/fetch-unread-count]})
|
||||
|
||||
(rf/defn handle-mark-all-read-in-community-successful
|
||||
{:events [::mark-all-read-in-community-successful]}
|
||||
[{:keys [db] :as cofx} chat-ids]
|
||||
(rf/merge cofx
|
||||
{:db (reduce mark-chat-all-read db chat-ids)}
|
||||
(activity-center/notifications-fetch-unread-count)))
|
||||
{:db (reduce mark-chat-all-read db chat-ids)
|
||||
:dispatch [:activity-center.notifications/fetch-unread-count]}))
|
||||
|
||||
(rf/defn handle-mark-all-read
|
||||
{:events [:chat.ui/mark-all-read-pressed :chat/mark-all-as-read]}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
(ns status-im.chat.models.message
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.chat.models :as chat-model]
|
||||
[status-im.chat.models.loading :as chat.loading]
|
||||
[status-im.chat.models.mentions :as mentions]
|
||||
[status-im2.contexts.chat.messages.list.events :as message-list]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im.data-store.messages :as data-store.messages]
|
||||
[status-im.transport.message.protocol :as protocol]
|
||||
[status-im2.contexts.chat.messages.list.state :as view.state]
|
||||
@@ -56,20 +54,6 @@
|
||||
{:db db}
|
||||
messages))
|
||||
|
||||
(defn timeline-message?
|
||||
[db chat-id]
|
||||
(and
|
||||
(get-in db [:pagination-info constants/timeline-chat-id :messages-initialized?])
|
||||
(or
|
||||
(= chat-id (chat-model/my-profile-chat-topic db))
|
||||
(when-let [pub-key (get-in db [:chats chat-id :profile-public-key])]
|
||||
(get-in db [:contacts/contacts pub-key :added])))))
|
||||
|
||||
(defn get-timeline-message
|
||||
[db chat-id message-js]
|
||||
(when (timeline-message? db chat-id)
|
||||
(data-store.messages/<-rpc (types/js->clj message-js))))
|
||||
|
||||
(defn add-message
|
||||
[{:keys [db] :as acc} message-js chat-id message-id cursor-clock-value]
|
||||
(let [{:keys [replace from clock-value] :as message}
|
||||
@@ -148,30 +132,6 @@
|
||||
(when (seq senders)
|
||||
[{:ms 100 :dispatch [:chat/add-senders-to-chat-users (vals senders)]}]))}))
|
||||
|
||||
(defn reduce-js-statuses
|
||||
[db ^js message-js]
|
||||
(let [chat-id (.-localChatId message-js)
|
||||
profile-initialized (get-in db [:pagination-info chat-id :messages-initialized?])
|
||||
timeline-message (timeline-message? db chat-id)
|
||||
old-message (get-in db [:messages chat-id (.-id message-js)])]
|
||||
(if (and (or profile-initialized timeline-message) (nil? old-message))
|
||||
(let [{:keys [message-id] :as message} (data-store.messages/<-rpc (types/js->clj message-js))]
|
||||
(cond-> db
|
||||
profile-initialized
|
||||
(update-in [:messages chat-id] assoc message-id message)
|
||||
profile-initialized
|
||||
(update-in [:message-lists chat-id] message-list/add message)
|
||||
timeline-message
|
||||
(update-in [:messages constants/timeline-chat-id] assoc message-id message)
|
||||
timeline-message
|
||||
(update-in [:message-lists constants/timeline-chat-id] message-list/add message)))
|
||||
db)))
|
||||
|
||||
(rf/defn process-statuses
|
||||
{:events [:process-statuses]}
|
||||
[{:keys [db]} statuses]
|
||||
{:db (reduce reduce-js-statuses db statuses)})
|
||||
|
||||
(rf/defn update-db-message-status
|
||||
[{:keys [db] :as cofx} chat-id message-id status]
|
||||
(when (get-in db [:messages chat-id message-id])
|
||||
|
||||
@@ -558,16 +558,20 @@
|
||||
(rf/defn request-to-join-accepted
|
||||
{:events [::request-to-join-accepted]}
|
||||
[{:keys [db] :as cofx} community-id request-id response-js]
|
||||
(rf/merge cofx
|
||||
{:db (update-in db [:communities/requests-to-join community-id] dissoc request-id)}
|
||||
(handle-response response-js)))
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (update-in db [:communities/requests-to-join community-id] dissoc request-id)
|
||||
:dispatch-n [[:sanitize-messages-and-process-response response-js]
|
||||
[:activity-center.notifications/mark-as-read request-id]]}))
|
||||
|
||||
(rf/defn request-to-join-declined
|
||||
{:events [::request-to-join-declined]}
|
||||
[{:keys [db] :as cofx} community-id request-id response-js]
|
||||
(rf/merge cofx
|
||||
{:db (update-in db [:communities/requests-to-join community-id] dissoc request-id)}
|
||||
(handle-response response-js)))
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (update-in db [:communities/requests-to-join community-id] dissoc request-id)
|
||||
:dispatch-n [[:sanitize-messages-and-process-response response-js]
|
||||
[:activity-center.notifications/mark-as-read request-id]]}))
|
||||
|
||||
(rf/defn accept-request-to-join-pressed
|
||||
{:events [:communities.ui/accept-request-to-join-pressed]}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
{:keys [chat-id
|
||||
unviewed-messages-count
|
||||
unviewed-mentions-count
|
||||
unviewed-replies-count
|
||||
last-message]}]
|
||||
(let [removed-messages-ids (keep
|
||||
(fn [[message-id {:keys [from]}]]
|
||||
@@ -29,6 +30,7 @@
|
||||
assoc
|
||||
:unviewed-messages-count unviewed-messages-count
|
||||
:unviewed-mentions-count unviewed-mentions-count
|
||||
:unviewed-replies-count unviewed-replies-count
|
||||
:last-message last-message))]
|
||||
{:db (assoc-in db
|
||||
[:message-lists chat-id]
|
||||
@@ -76,7 +78,7 @@
|
||||
(re-frame/dispatch [:hide-popover])))
|
||||
;; reset navigation to avoid going back to non existing one to one chat
|
||||
(if from-one-to-one-chat?
|
||||
(navigation/pop-to-root-tab :chat-stack)
|
||||
(navigation/pop-to-root-tab :shell-stack)
|
||||
(navigation/navigate-back)))))
|
||||
|
||||
(rf/defn contact-unblocked
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
(ns status-im.contact.chat
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[status-im.chat.models :as chat]
|
||||
[status-im.contact.core :as contact]
|
||||
[utils.re-frame :as rf]
|
||||
[status-im2.navigation.events :as navigation]))
|
||||
|
||||
(rf/defn send-message-pressed
|
||||
{:events [:contact.ui/send-message-pressed]
|
||||
:interceptors [(re-frame/inject-cofx :random-id-generator)]}
|
||||
[cofx {:keys [public-key ens-name]}]
|
||||
(chat/start-chat cofx public-key ens-name))
|
||||
|
||||
(rf/defn contact-code-submitted
|
||||
{:events [:contact.ui/contact-code-submitted]
|
||||
:interceptors [(re-frame/inject-cofx :random-id-generator)]}
|
||||
@@ -19,11 +12,6 @@
|
||||
(rf/merge cofx
|
||||
#(if new-contact?
|
||||
(contact/add-contact % public-key nickname ens-name)
|
||||
(chat/start-chat % public-key ens-name))
|
||||
{:dispatch [:chat.ui/start-chat public-key ens-name]})
|
||||
#(when new-contact?
|
||||
(navigation/navigate-back %)))))
|
||||
|
||||
(rf/defn pinned-messages-pressed
|
||||
{:events [:contact.ui/pinned-messages-pressed]}
|
||||
[cofx public-key]
|
||||
(chat/navigate-to-user-pinned-messages cofx public-key))
|
||||
|
||||
@@ -39,8 +39,6 @@
|
||||
blocked (:blocked contact)
|
||||
was-blocked (contact.db/blocked? db public-key)]
|
||||
(cond-> acc
|
||||
(and added (not was-added))
|
||||
(conj [:start-profile-chat public-key])
|
||||
|
||||
(and (not (:has-added-us contact))
|
||||
(= constants/contact-request-state-none (:contact-request-state contact)))
|
||||
@@ -51,7 +49,7 @@
|
||||
|
||||
(and blocked (not was-blocked))
|
||||
(conj [::contact.block/contact-blocked contact chats]))))
|
||||
[[:offload-messages constants/timeline-chat-id]
|
||||
[[:chat/offload-messages constants/timeline-chat-id]
|
||||
[:activity-center.notifications/fetch-unread-count]]
|
||||
contacts)]
|
||||
(merge
|
||||
@@ -93,7 +91,7 @@
|
||||
ens-name
|
||||
#(do
|
||||
(re-frame/dispatch [:sanitize-messages-and-process-response %])
|
||||
(re-frame/dispatch [:offload-messages constants/timeline-chat-id])))))
|
||||
(re-frame/dispatch [:chat/offload-messages constants/timeline-chat-id])))))
|
||||
|
||||
(rf/defn remove-contact
|
||||
"Remove a contact from current account's contact list"
|
||||
@@ -109,7 +107,7 @@
|
||||
{:method "wakuext_retractContactRequest"
|
||||
:params [{:contactId public-key}]
|
||||
:on-success #(log/debug "contact removed successfully")}]
|
||||
:dispatch [:offload-messages constants/timeline-chat-id]})
|
||||
:dispatch [:chat/offload-messages constants/timeline-chat-id]})
|
||||
|
||||
(rf/defn accept-contact-request
|
||||
{:events [:contact-requests.ui/accept-request]}
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
:chatType :chat-type
|
||||
:unviewedMessagesCount :unviewed-messages-count
|
||||
:unviewedMentionsCount :unviewed-mentions-count
|
||||
:unviewedRepliesCount :unviewed-replies-count
|
||||
:lastMessage :last-message
|
||||
:lastClockValue :last-clock-value
|
||||
:invitationAdmin :invitation-admin
|
||||
@@ -96,6 +97,7 @@
|
||||
:chat-type (.-chatType chat)
|
||||
:unviewed-messages-count (.-unviewedMessagesCount chat)
|
||||
:unviewed-mentions-count (.-unviewedMentionsCount chat)
|
||||
:unviewed-replies-count (.-unviewedRepliesCount chat)
|
||||
:last-message {:content {:text (.-text chat)
|
||||
:parsed-text (types/js->clj (.-parsedText chat))}
|
||||
:content-type (.-contentType chat)
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
:deleted :deleted?
|
||||
:deletedForMe :deleted-for-me?
|
||||
:albumId :album-id
|
||||
:imageWidth :image-width
|
||||
:imageHeight :image-height
|
||||
:new :new?})
|
||||
|
||||
(update :quoted-message
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
(set/rename-keys visibility-status-update
|
||||
{:publicKey :public-key
|
||||
:statusType :status-type}))
|
||||
|
||||
(defn <-rpc-settings
|
||||
[settings]
|
||||
(-> settings
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
status-im.bootnodes.core
|
||||
status-im.browser.core
|
||||
status-im.browser.permissions
|
||||
[status-im.chat.models :as chat]
|
||||
status-im.chat.models
|
||||
status-im.chat.models.images
|
||||
status-im.chat.models.input
|
||||
status-im.chat.models.loading
|
||||
@@ -112,10 +112,13 @@
|
||||
|
||||
(rf/defn system-theme-mode-changed
|
||||
{:events [:system-theme-mode-changed]}
|
||||
[cofx _]
|
||||
(when (multiaccounts.model/logged-in? cofx)
|
||||
{:multiaccounts.ui/switch-theme (get-in cofx [:db :multiaccount :appearance])
|
||||
:dispatch [:reload-new-ui]}))
|
||||
[{:keys [db] :as cofx} _]
|
||||
(let [current-theme-type (get-in cofx [:db :multiaccount :appearance])]
|
||||
(when (and (multiaccounts.model/logged-in? cofx)
|
||||
(= current-theme-type status-im2.constants/theme-type-system))
|
||||
{:multiaccounts.ui/switch-theme
|
||||
[(get-in db [:multiaccount :appearance])
|
||||
(:view-id db) true]})))
|
||||
|
||||
(def authentication-options
|
||||
{:reason (i18n/label :t/biometric-auth-reason-login)})
|
||||
@@ -184,12 +187,6 @@
|
||||
[{:keys [db]} dimensions]
|
||||
{:db (assoc db :dimensions/window (dimensions/window dimensions))})
|
||||
|
||||
(rf/defn init-timeline-chat
|
||||
{:events [:init-timeline-chat]}
|
||||
[{:keys [db] :as cofx}]
|
||||
(when-not (get-in db [:pagination-info constants/timeline-chat-id :messages-initialized?])
|
||||
(chat/preload-chat-data cofx constants/timeline-chat-id)))
|
||||
|
||||
(rf/defn on-will-focus
|
||||
{:events [:screens/on-will-focus]}
|
||||
[{:keys [db] :as cofx} view-id]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[utils.i18n :as i18n]
|
||||
[oops.core :as oops]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.chat.models :as models.chat]
|
||||
[status-im2.contexts.chat.events :as chat.events]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im2.contexts.activity-center.events :as activity-center]
|
||||
[status-im2.navigation.events :as navigation]
|
||||
@@ -15,7 +15,7 @@
|
||||
{:events [:navigate-chat-updated]}
|
||||
[cofx chat-id]
|
||||
(when (get-in cofx [:db :chats chat-id])
|
||||
(models.chat/navigate-to-chat-nav2 cofx chat-id nil)))
|
||||
(chat.events/navigate-to-chat cofx chat-id nil)))
|
||||
|
||||
(rf/defn handle-chat-removed
|
||||
{:events [:chat-removed]}
|
||||
@@ -23,7 +23,7 @@
|
||||
(rf/merge cofx
|
||||
{:db (dissoc (:db cofx) :current-chat-id)
|
||||
:dispatch-n [[:sanitize-messages-and-process-response response]
|
||||
[:pop-to-root-tab :chat-stack]]}
|
||||
[:pop-to-root-tab :shell-stack]]}
|
||||
(activity-center/notifications-fetch-unread-count)))
|
||||
|
||||
(rf/defn handle-chat-update
|
||||
@@ -76,7 +76,7 @@
|
||||
(rf/defn create-from-link
|
||||
[cofx {:keys [chat-id invitation-admin chat-name]}]
|
||||
(if (get-in cofx [:db :chats chat-id])
|
||||
{:dispatch [:chat.ui/navigate-to-chat-nav2 chat-id]}
|
||||
{:dispatch [:chat/navigate-to-chat chat-id]}
|
||||
{:json-rpc/call [{:method "wakuext_createGroupChatFromInvitation"
|
||||
:params [chat-name chat-id invitation-admin]
|
||||
:js-response true
|
||||
@@ -123,8 +123,8 @@
|
||||
{:events [:group-chats.ui/remove-chat-confirmed]}
|
||||
[cofx chat-id]
|
||||
(rf/merge cofx
|
||||
(models.chat/deactivate-chat chat-id)
|
||||
(navigation/pop-to-root-tab :chat-stack)))
|
||||
(chat.events/deactivate-chat chat-id)
|
||||
(navigation/pop-to-root-tab :shell-stack)))
|
||||
|
||||
(def not-blank?
|
||||
(complement string/blank?))
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
[clojure.string :as string]
|
||||
[day8.re-frame.test :as rf-test]
|
||||
[re-frame.core :as rf]
|
||||
[status-im.chat.models :as chat.models]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
status-im.events
|
||||
status-im2.events
|
||||
[status-im.multiaccounts.logout.core :as logout]
|
||||
[status-im.transport.core :as transport]
|
||||
[status-im.utils.test :as utils.test]
|
||||
@@ -250,8 +250,8 @@
|
||||
(assert-messenger-started)
|
||||
(rf/dispatch-sync [:chat.ui/start-chat chat-id]) ;; start a new chat
|
||||
(rf-test/wait-for
|
||||
[:status-im.chat.models/one-to-one-chat-created]
|
||||
(rf/dispatch-sync [:chat.ui/navigate-to-chat-nav2 chat-id])
|
||||
[:chat/one-to-one-chat-created]
|
||||
(rf/dispatch-sync [:chat/navigate-to-chat chat-id])
|
||||
(is (= chat-id @(rf/subscribe [:chats/current-chat-id])))
|
||||
(logout!)
|
||||
(rf-test/wait-for [::logout/logout-method] ; we need to logout to make sure the node is not in
|
||||
@@ -275,20 +275,17 @@
|
||||
(assert-messenger-started)
|
||||
(rf/dispatch-sync [:chat.ui/start-chat chat-id]) ;; start a new chat
|
||||
(rf-test/wait-for
|
||||
[:status-im.chat.models/one-to-one-chat-created]
|
||||
(rf/dispatch-sync [:chat.ui/navigate-to-chat-nav2 chat-id])
|
||||
[:chat/one-to-one-chat-created]
|
||||
(rf/dispatch-sync [:chat/navigate-to-chat chat-id])
|
||||
(is (= chat-id @(rf/subscribe [:chats/current-chat-id])))
|
||||
(is @(rf/subscribe [:chats/chat chat-id]))
|
||||
(rf/dispatch-sync [:chat.ui/remove-chat-pressed chat-id])
|
||||
(rf/dispatch-sync [:chat.ui/show-remove-confirmation chat-id])
|
||||
(rf/dispatch-sync [:chat.ui/remove-chat chat-id])
|
||||
(rf-test/wait-for
|
||||
[::chat.models/chat-deactivated]
|
||||
(is (not @(rf/subscribe [:chats/chat chat-id])))
|
||||
(logout!)
|
||||
(rf-test/wait-for [::logout/logout-method] ; we need to logout to make sure the node is not
|
||||
; in an
|
||||
; inconsistent state between tests
|
||||
(assert-logout)))))))))
|
||||
(logout!)
|
||||
(rf-test/wait-for [::logout/logout-method] ; we need to logout to make sure the node is not
|
||||
; in an
|
||||
; inconsistent state between tests
|
||||
(assert-logout))))))))
|
||||
|
||||
(deftest mute-chat-test
|
||||
(log/info "========= mute-chat-test ==================")
|
||||
@@ -306,18 +303,17 @@
|
||||
(assert-messenger-started)
|
||||
(rf/dispatch-sync [:chat.ui/start-chat chat-id]) ;; start a new chat
|
||||
(rf-test/wait-for
|
||||
[:status-im.chat.models/one-to-one-chat-created]
|
||||
(rf/dispatch-sync [:chat.ui/navigate-to-chat-nav2 chat-id])
|
||||
[:chat/one-to-one-chat-created]
|
||||
(rf/dispatch-sync [:chat/navigate-to-chat chat-id])
|
||||
(is (= chat-id @(rf/subscribe [:chats/current-chat-id])))
|
||||
(is @(rf/subscribe [:chats/chat chat-id]))
|
||||
(rf/dispatch-sync [::chat.models/mute-chat-toggled chat-id true])
|
||||
(rf/dispatch-sync [:chat.ui/mute chat-id true])
|
||||
(rf-test/wait-for
|
||||
[::chat.models/mute-chat-toggled-successfully]
|
||||
[:chat/mute-successfully]
|
||||
(is @(rf/subscribe [:chats/muted chat-id]))
|
||||
(rf/dispatch-sync [::chat.models/mute-chat-toggled chat-id false])
|
||||
(rf/dispatch-sync [:chat.ui/mute chat-id false])
|
||||
(rf-test/wait-for
|
||||
[::chat.models/mute-chat-toggled-successfully]
|
||||
|
||||
[:chat/mute-successfully]
|
||||
(is (not @(rf/subscribe [:chats/muted chat-id])))
|
||||
(logout!)
|
||||
(rf-test/wait-for [::logout/logout-method] ; we need to logout to make sure the node is
|
||||
|
||||
@@ -8,11 +8,15 @@
|
||||
[status-im.native-module.core :as native-module]
|
||||
[status-im.theme.core :as theme]
|
||||
[utils.re-frame :as rf]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im.utils.gfycat.core :as gfycat]
|
||||
[status-im.utils.identicon :as identicon]
|
||||
[status-im.utils.utils :as utils]
|
||||
[status-im2.setup.hot-reload :as hot-reload]
|
||||
[status-im2.common.theme.core :as utils.theme]
|
||||
[taoensso.timbre :as log]))
|
||||
[taoensso.timbre :as log]
|
||||
[status-im2.contexts.shell.animation :as shell.animation]))
|
||||
|
||||
;; validate that the given mnemonic was generated from Status Dictionary
|
||||
(re-frame/reg-fx
|
||||
@@ -173,17 +177,27 @@
|
||||
|
||||
(re-frame/reg-fx
|
||||
:multiaccounts.ui/switch-theme
|
||||
(fn [theme-id]
|
||||
(let [theme (if (or (= 2 theme-id) (and (= 0 theme-id) (utils.theme/dark-mode?)))
|
||||
:dark
|
||||
:light)]
|
||||
(theme/change-theme theme))))
|
||||
(fn [[theme-type view-id reload-ui?]]
|
||||
(let [[theme status-bar-theme nav-bar-color]
|
||||
;; Status bar theme represents status bar icons colors, so opposite to app theme
|
||||
(if (or (= theme-type constants/theme-type-dark)
|
||||
(and (= theme-type constants/theme-type-system)
|
||||
(utils.theme/dark-mode?)))
|
||||
[:dark :light colors/neutral-100]
|
||||
[:light :dark colors/white])]
|
||||
(theme/change-theme theme)
|
||||
(re-frame/dispatch [:change-root-status-bar-style
|
||||
(if (shell.animation/home-stack-open?) status-bar-theme :light)])
|
||||
(when reload-ui?
|
||||
(hot-reload/reload)
|
||||
(when-not (= view-id :shell-stack)
|
||||
(re-frame/dispatch [:change-root-nav-bar-color nav-bar-color]))))))
|
||||
|
||||
(rf/defn switch-appearance
|
||||
{:events [:multiaccounts.ui/appearance-switched]}
|
||||
[cofx theme]
|
||||
(rf/merge cofx
|
||||
{:multiaccounts.ui/switch-theme theme}
|
||||
{:multiaccounts.ui/switch-theme [theme :appearance true]}
|
||||
(multiaccounts.update/multiaccount-update :appearance theme {})))
|
||||
|
||||
(rf/defn switch-profile-picture-show-to
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
[status-im2.contexts.activity-center.events :as activity-center]
|
||||
[status-im2.contexts.chat.messages.link-preview.events :as link-preview]
|
||||
[status-im2.navigation.events :as navigation]
|
||||
[status-im2.setup.log :as logging]
|
||||
[status-im2.common.log :as logging]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.security.core :as security]))
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
|
||||
(rf/defn initialize-appearance
|
||||
[cofx]
|
||||
{:multiaccounts.ui/switch-theme (get-in cofx [:db :multiaccount :appearance])})
|
||||
{:multiaccounts.ui/switch-theme [(get-in cofx [:db :multiaccount :appearance]) nil false]})
|
||||
|
||||
(rf/defn get-group-chat-invitations
|
||||
[_]
|
||||
@@ -424,7 +424,7 @@
|
||||
:key-uid
|
||||
(fn [stored-key-uid]
|
||||
(when (= stored-key-uid key-uid)
|
||||
(re-frame/dispatch [:chat.ui/navigate-to-chat-nav2 chat-id])))))))))
|
||||
(re-frame/dispatch [:chat/navigate-to-chat chat-id])))))))))
|
||||
|
||||
(rf/defn check-last-chat
|
||||
{:events [::check-last-chat]}
|
||||
@@ -490,7 +490,7 @@
|
||||
"Decides which root should be initialised depending on user and app state"
|
||||
[db]
|
||||
(if (get db :tos/accepted?)
|
||||
(re-frame/dispatch [:init-root (if config/new-ui-enabled? :shell-stack :chat-stack)])
|
||||
(re-frame/dispatch [:init-root :shell-stack])
|
||||
(re-frame/dispatch [:init-root :tos])))
|
||||
|
||||
(rf/defn login-only-events
|
||||
@@ -539,14 +539,7 @@
|
||||
(multiaccounts/switch-preview-privacy-mode-flag)
|
||||
(link-preview/request-link-preview-whitelist)
|
||||
(logging/set-log-level (:log-level multiaccount))
|
||||
|
||||
(if config/new-ui-enabled?
|
||||
(navigation/init-root :shell-stack)
|
||||
;; if it's a first account, the ToS will be accepted at welcome carousel
|
||||
;; if not a first account, the ToS might have been accepted by other account logins
|
||||
(if (or first-account? tos-accepted?)
|
||||
(navigation/init-root :onboarding-notification)
|
||||
(navigation/init-root :tos))))))
|
||||
(navigation/init-root :shell-stack))))
|
||||
|
||||
(defn- keycard-setup?
|
||||
[cofx]
|
||||
@@ -564,7 +557,7 @@
|
||||
:multiaccount)
|
||||
(assoc :tos-accept-next-root
|
||||
(if login-only?
|
||||
:chat-stack
|
||||
:shell-stack
|
||||
:onboarding-notification))
|
||||
(assoc :logged-in-since now)
|
||||
(assoc :view-id :home)))
|
||||
@@ -737,7 +730,7 @@
|
||||
(rf/defn welcome-lets-go
|
||||
{:events [:welcome-lets-go]}
|
||||
[_]
|
||||
{:init-root-fx :chat-stack})
|
||||
{:init-root-fx :shell-stack})
|
||||
|
||||
(rf/defn multiaccount-selected
|
||||
{:events [:multiaccounts.login.ui/multiaccount-selected]}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
[utils.re-frame :as rf]
|
||||
[status-im.utils.keychain.core :as keychain]
|
||||
[status-im.wallet.core :as wallet]
|
||||
[status-im2.setup.events :as init]))
|
||||
[status-im2.events :as init]))
|
||||
|
||||
(rf/defn logout-method
|
||||
{:events [::logout-method]}
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
(re-frame/dispatch [:set :current-tab tab-key])
|
||||
(when (= @state/root-comp-id comp)
|
||||
(when (= :chat tab-key)
|
||||
(re-frame/dispatch [:close-chat]))
|
||||
(re-frame/dispatch [:chat/close]))
|
||||
(when platform/android?
|
||||
(.popToRoot Navigation (name comp))))
|
||||
(reset! state/root-comp-id comp)))))
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
[quo.platform :as platform]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.async-storage.core :as async-storage]
|
||||
[status-im.chat.models :as chat.models]
|
||||
[status-im.ethereum.decode :as decode]
|
||||
[status-im.ethereum.tokens :as tokens]
|
||||
[utils.i18n :as i18n]
|
||||
@@ -105,6 +104,11 @@
|
||||
:user-info notification
|
||||
:message description}))
|
||||
|
||||
(defn foreground-chat?
|
||||
[{{:keys [current-chat-id view-id]} :db} chat-id]
|
||||
(and (= current-chat-id chat-id)
|
||||
(= view-id :chat)))
|
||||
|
||||
(defn show-message-pn?
|
||||
[{{:keys [app-state multiaccount]} :db :as cofx}
|
||||
notification]
|
||||
@@ -113,7 +117,7 @@
|
||||
(and
|
||||
(not= notification-author (:public-key multiaccount))
|
||||
(or (= app-state "background")
|
||||
(not (chat.models/foreground-chat? cofx chat-id))))))
|
||||
(not (foreground-chat? cofx chat-id))))))
|
||||
|
||||
(defn create-notification
|
||||
([notification]
|
||||
|
||||
@@ -84,3 +84,12 @@
|
||||
{:events [:profile/share-profile-link]}
|
||||
[_ value]
|
||||
{:profile/share-profile-link value})
|
||||
|
||||
(rf/defn show-profile
|
||||
{:events [:chat.ui/show-profile]}
|
||||
[{:keys [db]} identity ens-name]
|
||||
(let [my-public-key (get-in db [:multiaccount :public-key])]
|
||||
(when (not= my-public-key identity)
|
||||
{:db (-> db
|
||||
(assoc :contacts/identity identity)
|
||||
(assoc :contacts/ens-name ens-name))})))
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
(rf/defn handle-private-chat
|
||||
[{:keys [db] :as cofx} {:keys [chat-id]}]
|
||||
(if-not (new-chat.db/own-public-key? db chat-id)
|
||||
(chat/start-chat cofx chat-id nil)
|
||||
{:dispatch [:chat.ui/start-chat chat-id]}
|
||||
{:utils/show-popup {:title (i18n/label :t/unable-to-read-this-code)
|
||||
:content (i18n/label :t/can-not-add-yourself)}}))
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
:else
|
||||
{:utils/show-popup {:title (i18n/label :t/unable-to-read-this-code)
|
||||
:content (i18n/label :t/ens-name-not-found)
|
||||
:on-dismiss #(re-frame/dispatch [:pop-to-root-tab :chat-stack])}})))
|
||||
:on-dismiss #(re-frame/dispatch [:pop-to-root-tab :shell-stack])}})))
|
||||
|
||||
(rf/defn handle-eip681
|
||||
[cofx data]
|
||||
@@ -116,7 +116,7 @@
|
||||
:event ::match-scanned-value})
|
||||
{:dispatch [:navigate-back]
|
||||
:utils/show-popup {:title (i18n/label :t/unable-to-read-this-code)
|
||||
:on-dismiss #(re-frame/dispatch [:pop-to-root-tab :chat-stack])}})))
|
||||
:on-dismiss #(re-frame/dispatch [:pop-to-root-tab :shell-stack])}})))
|
||||
|
||||
(rf/defn on-scan
|
||||
{:events [::on-scan-success]}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.add-new.db :as public-chat.db]
|
||||
[status-im.chat.models :as chat.models]
|
||||
[status-im2.contexts.chat.events :as chat.events]
|
||||
[status-im2.constants :as constants]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.ethereum.eip681 :as eip681]
|
||||
@@ -121,7 +121,7 @@
|
||||
:chat-name chat-name}
|
||||
|
||||
(and (not (string/blank? chat-id))
|
||||
(chat.models/group-chat? (get chats chat-id)))
|
||||
(chat.events/group-chat? (get chats chat-id)))
|
||||
(let [{:keys [chat-name invitation-admin]} (get chats chat-id)]
|
||||
{:type :group-chat
|
||||
:chat-id chat-id
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[status-im.browser.core :as browser]
|
||||
[status-im.chat.models :as models.chat]
|
||||
[status-im2.contexts.chat.events :as chat.events]
|
||||
[status-im.chat.models.message :as models.message]
|
||||
[status-im.chat.models.reactions :as models.reactions]
|
||||
[status-im.communities.core :as models.communities]
|
||||
@@ -61,7 +61,7 @@
|
||||
(js-delete response-js "chats")
|
||||
(rf/merge cofx
|
||||
(process-next response-js sync-handler)
|
||||
(models.chat/ensure-chats (map data-store.chats/<-rpc (types/js->clj chats)))))
|
||||
(chat.events/ensure-chats (map data-store.chats/<-rpc (types/js->clj chats)))))
|
||||
|
||||
(seq messages)
|
||||
(models.message/receive-many cofx response-js)
|
||||
@@ -200,12 +200,11 @@
|
||||
message-type (.-messageType message-js)
|
||||
from (.-from message-js)
|
||||
mentioned (.-mentioned message-js)
|
||||
profile (models.chat/profile-chat? {:db db} chat-id)
|
||||
replied (.-replied message-js)
|
||||
new (.-new message-js)
|
||||
current (= current-chat-id chat-id)
|
||||
should-update-unviewed? (and (not current)
|
||||
new
|
||||
(not profile)
|
||||
(not (= message-type
|
||||
constants/message-type-private-group-system-message))
|
||||
(not (= from (multiaccounts.model/current-public-key {:db db}))))
|
||||
@@ -215,9 +214,6 @@
|
||||
current
|
||||
(update :messages conj message-js)
|
||||
|
||||
profile
|
||||
(update :statuses conj message-js)
|
||||
|
||||
;;update counter
|
||||
should-update-unviewed?
|
||||
(update-in [:db :chats chat-id :unviewed-messages-count] inc)
|
||||
@@ -226,6 +222,10 @@
|
||||
mentioned)
|
||||
(update-in [:db :chats chat-id :unviewed-mentions-count] inc)
|
||||
|
||||
(and should-update-unviewed?
|
||||
replied)
|
||||
(update-in [:db :chats chat-id :unviewed-replies-count] inc)
|
||||
|
||||
;;conj incoming transaction for :watch-tx
|
||||
(not (string/blank? tx-hash))
|
||||
(update :transactions conj tx-hash)
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
(defn build-message
|
||||
[{:keys [chat-id
|
||||
album-id
|
||||
image-width
|
||||
image-height
|
||||
text
|
||||
response-to
|
||||
ens-name
|
||||
@@ -17,6 +19,8 @@
|
||||
content-type]}]
|
||||
{:chatId chat-id
|
||||
:albumId album-id
|
||||
:imageWidth image-width
|
||||
:imageHeight image-height
|
||||
:text text
|
||||
:responseTo response-to
|
||||
:ensName ens-name
|
||||
|
||||
@@ -5,17 +5,12 @@
|
||||
[re-frame.core :as re-frame]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.react-native.resources :as resources]
|
||||
[status-im.ui.components.react :as react]
|
||||
[status-im2.config :as config]))
|
||||
[status-im.ui.components.react :as react]))
|
||||
|
||||
(defn button
|
||||
[label icon theme selected?]
|
||||
[react/touchable-highlight
|
||||
{:on-press (fn []
|
||||
(re-frame/dispatch [:multiaccounts.ui/appearance-switched theme])
|
||||
(re-frame/dispatch (if config/new-ui-enabled? [:reload-new-ui] [:init-root :chat-stack]))
|
||||
(re-frame/dispatch [:navigate-change-tab :profile])
|
||||
(js/setTimeout #(re-frame/dispatch [:navigate-to :appearance]) 1000))}
|
||||
{:on-press #(re-frame/dispatch [:multiaccounts.ui/appearance-switched theme])}
|
||||
[react/view
|
||||
(merge {:align-items :center :padding 8 :border-radius 20}
|
||||
(when selected?
|
||||
|
||||
@@ -7,11 +7,6 @@
|
||||
[status-im.ui.screens.chat.styles.input.gap :as style]
|
||||
[utils.datetime :as datetime]))
|
||||
|
||||
(defn on-press
|
||||
[chat-id gap-ids]
|
||||
(fn []
|
||||
(re-frame/dispatch [:chat.ui/fill-gaps chat-id gap-ids])))
|
||||
|
||||
(views/defview gap
|
||||
[{:keys [gap-ids chat-id gap-parameters public? community?]}]
|
||||
(views/letsubs [in-progress? [:chats/fetching-gap-in-progress?
|
||||
@@ -25,7 +20,7 @@
|
||||
[react/view {:style (when-not in-progress? style/gap-container)}
|
||||
[react/touchable-highlight
|
||||
{:on-press (when (and (not in-progress?) use-status-nodes? connected?)
|
||||
(on-press chat-id gap-ids))
|
||||
(re-frame/dispatch [:chat.ui/fill-gaps chat-id gap-ids]))
|
||||
:style {:height (if in-progress? window-height 48)}}
|
||||
[react/view {:style style/label-container}
|
||||
(if in-progress?
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
:title (i18n/label :t/delete-chat)
|
||||
:accessibility-label :delete-chat-button
|
||||
:icon :main-icons/delete
|
||||
:on-press #(re-frame/dispatch [:chat.ui/remove-chat-pressed chat-id])}]]))
|
||||
:on-press #(re-frame/dispatch [:chat.ui/show-remove-confirmation chat-id])}]]))
|
||||
|
||||
(defn public-chat-accents
|
||||
[chat-id]
|
||||
@@ -69,13 +69,13 @@
|
||||
:title (i18n/label :t/clear-history)
|
||||
:accessibility-label :clear-history-button
|
||||
:icon :main-icons/close
|
||||
:on-press #(re-frame/dispatch [:chat.ui/clear-history-pressed chat-id])}]
|
||||
:on-press #(re-frame/dispatch [:chat.ui/show-clear-history-confirmation chat-id])}]
|
||||
[quo/list-item
|
||||
{:theme :negative
|
||||
:title (i18n/label :t/delete-chat)
|
||||
:accessibility-label :delete-chat-button
|
||||
:icon :main-icons/delete
|
||||
:on-press #(re-frame/dispatch [:chat.ui/remove-chat-pressed chat-id])}]]))
|
||||
:on-press #(re-frame/dispatch [:chat.ui/show-remove-confirmation chat-id])}]]))
|
||||
|
||||
(defn community-chat-accents
|
||||
[]
|
||||
|
||||
@@ -64,4 +64,5 @@
|
||||
:accessory :text
|
||||
:accessory-text (count pinned-messages)
|
||||
:chevron true
|
||||
:on-press #(re-frame/dispatch [:contact.ui/pinned-messages-pressed chat-id])}]])]))))
|
||||
:on-press #(re-frame/dispatch [:chat.ui/navigate-to-pinned-messages
|
||||
chat-id])}]])]))))
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
(assoc home-item :public? true)
|
||||
{:on-press (fn []
|
||||
(rf/dispatch [:dismiss-keyboard])
|
||||
(rf/dispatch [:chat.ui/navigate-to-chat-nav2 chat-id])
|
||||
(rf/dispatch [:chat/navigate-to-chat chat-id])
|
||||
(rf/dispatch [:search/home-filter-changed nil]))
|
||||
:on-long-press #(rf/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
|
||||
@@ -22,11 +22,14 @@
|
||||
|
||||
(defn community-unviewed-count
|
||||
[id]
|
||||
(let [{:keys [unviewed-messages-count unviewed-mentions-count]} (rf/sub [:communities/unviewed-counts
|
||||
id])]
|
||||
(let [{:keys [unviewed-messages-count
|
||||
unviewed-mentions-count
|
||||
unviewed-replies-count]}
|
||||
(rf/sub [:communities/unviewed-counts id])
|
||||
unviewed-count (+ unviewed-mentions-count unviewed-replies-count)]
|
||||
(cond
|
||||
(pos? unviewed-mentions-count)
|
||||
[badge/message-counter unviewed-mentions-count]
|
||||
(pos? unviewed-count)
|
||||
[badge/message-counter unviewed-count]
|
||||
|
||||
(pos? unviewed-messages-count)
|
||||
[react/view
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
home-item
|
||||
{:on-press (fn []
|
||||
(re-frame/dispatch [:dismiss-keyboard])
|
||||
(re-frame/dispatch [:chat.ui/navigate-to-chat-nav2 chat-id])
|
||||
(re-frame/dispatch [:chat/navigate-to-chat chat-id])
|
||||
(re-frame/dispatch [:search/home-filter-changed nil]))
|
||||
:on-long-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
@@ -166,7 +166,7 @@
|
||||
home-item
|
||||
{:on-press (fn []
|
||||
(re-frame/dispatch [:dismiss-keyboard])
|
||||
(re-frame/dispatch [:chat.ui/navigate-to-chat-nav2 chat-id])
|
||||
(re-frame/dispatch [:chat/navigate-to-chat chat-id])
|
||||
(re-frame/dispatch [:search/home-filter-changed nil]))
|
||||
:on-long-press #(re-frame/dispatch [:bottom-sheet/show-sheet
|
||||
{:content (fn []
|
||||
@@ -193,7 +193,7 @@
|
||||
[list/flat-list
|
||||
{:key-fn chat-list-key-fn
|
||||
:getItemLayout get-item-layout
|
||||
:on-end-reached #(re-frame/dispatch [:chat.ui/show-more-chats])
|
||||
:on-end-reached #(re-frame/dispatch [:chat/show-more-chats])
|
||||
:keyboard-should-persist-taps :always
|
||||
:data items
|
||||
:render-fn render-fn
|
||||
@@ -219,7 +219,7 @@
|
||||
[list/flat-list
|
||||
{:key-fn chat-list-key-fn
|
||||
:getItemLayout get-item-layout
|
||||
:on-end-reached #(re-frame/dispatch [:chat.ui/show-more-chats])
|
||||
:on-end-reached #(re-frame/dispatch [:chat/show-more-chats])
|
||||
:keyboard-should-persist-taps :always
|
||||
:data items
|
||||
:render-fn render-fn-old
|
||||
|
||||
@@ -127,39 +127,43 @@
|
||||
|
||||
(defn unviewed-indicator
|
||||
[{:keys [unviewed-mentions-count
|
||||
unviewed-replies-count
|
||||
unviewed-messages-count
|
||||
public?]}]
|
||||
(when (pos? unviewed-messages-count)
|
||||
[react/view {:position :absolute :right 16}
|
||||
(cond
|
||||
(and public? (not (pos? unviewed-mentions-count)))
|
||||
[react/view
|
||||
{:style styles/public-unread
|
||||
:accessibility-label :unviewed-messages-public}]
|
||||
(let [unviewed-count (+ unviewed-mentions-count unviewed-replies-count)]
|
||||
(when (pos? unviewed-count)
|
||||
[react/view {:position :absolute :right 16}
|
||||
(cond
|
||||
(and public? (not (pos? unviewed-count)))
|
||||
[react/view
|
||||
{:style styles/public-unread
|
||||
:accessibility-label :unviewed-messages-public}]
|
||||
|
||||
(and public? (pos? unviewed-mentions-count))
|
||||
[badge/message-counter unviewed-mentions-count]
|
||||
(and public? (pos? unviewed-count))
|
||||
[badge/message-counter unviewed-count]
|
||||
|
||||
:else
|
||||
[badge/message-counter unviewed-messages-count])]))
|
||||
:else
|
||||
[badge/message-counter unviewed-messages-count])])))
|
||||
|
||||
(defn unviewed-indicator-old
|
||||
[{:keys [unviewed-mentions-count
|
||||
unviewed-messages-count
|
||||
unviewed-replies-count
|
||||
public?]}]
|
||||
(when (pos? unviewed-messages-count)
|
||||
[react/view {:position :absolute :right 16 :bottom 12}
|
||||
(cond
|
||||
(and public? (not (pos? unviewed-mentions-count)))
|
||||
[react/view
|
||||
{:style styles/public-unread
|
||||
:accessibility-label :unviewed-messages-public}]
|
||||
(let [unviewed-count (+ unviewed-mentions-count unviewed-replies-count)]
|
||||
(when (pos? unviewed-messages-count)
|
||||
[react/view {:position :absolute :right 16 :bottom 12}
|
||||
(cond
|
||||
(and public? (not (pos? unviewed-count)))
|
||||
[react/view
|
||||
{:style styles/public-unread
|
||||
:accessibility-label :unviewed-messages-public}]
|
||||
|
||||
(and public? (pos? unviewed-mentions-count))
|
||||
[badge/message-counter unviewed-mentions-count]
|
||||
(and public? (pos? unviewed-count))
|
||||
[badge/message-counter unviewed-count]
|
||||
|
||||
:else
|
||||
[badge/message-counter unviewed-messages-count])]))
|
||||
:else
|
||||
[badge/message-counter unviewed-messages-count])])))
|
||||
|
||||
(defn icon-style
|
||||
[]
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
[quo.design-system.colors :as colors]
|
||||
[re-frame.core :as re-frame]
|
||||
[reagent.core :as reagent]
|
||||
[status-im.chat.models :as chat.models]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.multiaccounts.core :as multiaccounts]
|
||||
[status-im.ui.components.chat-icon.screen :as chat-icon]
|
||||
[status-im.ui.components.icons.icons :as icons]
|
||||
[status-im.ui.components.keyboard-avoid-presentation :as kb-presentation]
|
||||
[status-im.ui.components.profile-header.view :as profile-header]
|
||||
[status-im.ui.components.react :as react]
|
||||
[status-im.ui.components.toolbar :as toolbar]
|
||||
[status-im.ui.components.topbar :as topbar]
|
||||
@@ -24,7 +24,7 @@
|
||||
(concat [{:label (i18n/label :t/chat)
|
||||
:icon :main-icons/message
|
||||
:disabled (not mutual?)
|
||||
:action #(re-frame/dispatch [:contact.ui/send-message-pressed
|
||||
:action #(re-frame/dispatch [:chat.ui/start-chat
|
||||
{:public-key public-key
|
||||
:ens-name ens-name}])
|
||||
:accessibility-label :start-conversation-button}]
|
||||
@@ -47,8 +47,7 @@
|
||||
:selected muted?
|
||||
:disabled blocked?
|
||||
:action (when-not blocked?
|
||||
#(re-frame/dispatch [::chat.models/mute-chat-toggled public-key
|
||||
(not muted?)]))}]
|
||||
#(re-frame/dispatch [:chat.ui/mute public-key (not muted?)]))}]
|
||||
[{:label (i18n/label (if blocked? :t/unblock :t/block))
|
||||
:negative true
|
||||
:selected blocked?
|
||||
@@ -101,7 +100,7 @@
|
||||
:accessory :text
|
||||
:accessory-text pin-count
|
||||
:disabled (zero? pin-count)
|
||||
:on-press #(re-frame/dispatch [:contact.ui/pinned-messages-pressed public-key])
|
||||
:on-press #(re-frame/dispatch [:chat.ui/navigate-to-pinned-messages public-key])
|
||||
:chevron true}])
|
||||
|
||||
(defn nickname-settings
|
||||
@@ -207,6 +206,11 @@
|
||||
[]
|
||||
(let [{:keys [public-key name ens-verified] :as contact} @(re-frame/subscribe
|
||||
[:contacts/current-contact])
|
||||
muted? @(re-frame/subscribe [:chats/muted
|
||||
public-key])
|
||||
pinned-messages @(re-frame/subscribe [:chats/pinned
|
||||
public-key])
|
||||
[first-name second-name] (multiaccounts/contact-two-names contact true)
|
||||
on-share #(re-frame/dispatch
|
||||
[:show-popover
|
||||
(merge
|
||||
@@ -222,4 +226,27 @@
|
||||
:on-press on-share}]
|
||||
:left-accessories [{:icon :main-icons/close
|
||||
:accessibility-label :back-button
|
||||
:on-press #(re-frame/dispatch [:navigate-back])}]}]])))
|
||||
:on-press #(re-frame/dispatch [:navigate-back])}]}]
|
||||
[:<>
|
||||
[(profile-header/extended-header
|
||||
{:on-press on-share
|
||||
:bottom-separator false
|
||||
:title first-name
|
||||
:photo (multiaccounts/displayed-photo contact)
|
||||
:monospace (not ens-verified)
|
||||
:subtitle second-name
|
||||
:public-key public-key})]
|
||||
[react/view
|
||||
{:height 1 :background-color colors/gray-lighter :margin-top 8}]
|
||||
[nickname-settings contact]
|
||||
[pin-settings public-key (count pinned-messages)]
|
||||
[react/view {:height 1 :background-color colors/gray-lighter}]
|
||||
[react/view
|
||||
{:padding-top 17
|
||||
:flex-direction :row
|
||||
:align-items :stretch
|
||||
:flex 1}
|
||||
(for [{:keys [label] :as action} (actions contact muted?)
|
||||
:when label]
|
||||
^{:key label}
|
||||
[button-item action])]]])))
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
:accessory :text
|
||||
:accessory-text (count pinned-messages)
|
||||
:chevron true
|
||||
:on-press #(re-frame/dispatch [:contact.ui/pinned-messages-pressed chat-id])}]
|
||||
:on-press #(re-frame/dispatch [:chat.ui/navigate-to-pinned-messages chat-id])}]
|
||||
(when member?
|
||||
[quo/list-item
|
||||
{:theme :negative
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
;; so we need some magic here with paddings so close button isn't cut
|
||||
[rn/view {:padding-top 12 :padding-bottom 8 :padding-right 12}
|
||||
[rn/image
|
||||
{:source {:uri (first item)}
|
||||
{:source {:uri (:uri (val item))}
|
||||
:style style/small-image}]
|
||||
[rn/touchable-opacity
|
||||
{:on-press #(rf/dispatch [:chat.ui/image-unselected (first item)])
|
||||
{:on-press (fn [] (rf/dispatch [:chat.ui/image-unselected (val item)]))
|
||||
:style style/remove-photo-container
|
||||
:hit-slop {:right 5
|
||||
:left 5
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
(ns status-im.ui2.screens.chat.composer.input
|
||||
(:require ["react-native" :as react-native]
|
||||
[clojure.string :as string]
|
||||
(:require [clojure.string :as string]
|
||||
[oops.core :as oops]
|
||||
[quo.design-system.colors :as quo.colors]
|
||||
[quo.react]
|
||||
[quo.react-native :as rn]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[re-frame.core :as re-frame]
|
||||
[reagent.core :as reagent]
|
||||
[status-im2.constants :as chat.constants]
|
||||
[status-im.chat.models.mentions :as mentions]
|
||||
[utils.i18n :as i18n]
|
||||
[status-im.ui.components.react :as react]
|
||||
[utils.re-frame :as rf]
|
||||
[status-im.utils.platform :as platform]
|
||||
[status-im.utils.utils :as utils.utils]
|
||||
[utils.transforms :as transforms]
|
||||
[quo2.foundations.typography :as typography]))
|
||||
[quo2.foundations.typography :as typography]
|
||||
[react-native.background-timer :as background-timer]
|
||||
[react-native.platform :as platform]
|
||||
[react-native.core :as rn]
|
||||
[react-native.clipboard :as clipboard]
|
||||
[quo.react :as quo.react]))
|
||||
|
||||
(defonce input-texts (atom {}))
|
||||
(defonce input-text-content-heights (atom {}))
|
||||
@@ -94,7 +92,7 @@
|
||||
(when platform/ios?
|
||||
(reset!
|
||||
timeout-id
|
||||
(utils.utils/set-timeout
|
||||
(background-timer/set-timeout
|
||||
#(rf/dispatch [::mentions/on-selection-change
|
||||
{:start start
|
||||
:end end}
|
||||
@@ -128,7 +126,7 @@
|
||||
;; happens during typing because it is not needed for mention
|
||||
;; suggestions calculation
|
||||
(when (and platform/ios? @timeout-id)
|
||||
(utils.utils/clear-timeout @timeout-id))
|
||||
(background-timer/clear-timeout @timeout-id))
|
||||
(when platform/android?
|
||||
(reset! last-text-change (js/Date.now)))
|
||||
|
||||
@@ -169,7 +167,7 @@
|
||||
:min-height 34
|
||||
:margin 0
|
||||
:flex-shrink 1
|
||||
:color (:text-01 @quo.colors/theme)
|
||||
:color (colors/theme-colors colors/neutral-100 colors/white)
|
||||
:margin-horizontal 20}
|
||||
(if platform/android?
|
||||
{:padding-vertical 8
|
||||
@@ -195,7 +193,7 @@
|
||||
:blur-on-submit false
|
||||
:auto-focus false
|
||||
:max-length chat.constants/max-text-size
|
||||
:placeholder-text-color (:text-02 @quo.colors/theme)
|
||||
:placeholder-text-color (colors/theme-colors colors/neutral-40 colors/white-opa-30)
|
||||
:placeholder (if cooldown-enabled?
|
||||
(i18n/label :cooldown/text-input-disabled)
|
||||
(i18n/label :t/type-a-message))
|
||||
@@ -230,14 +228,6 @@
|
||||
[rn/text-input props
|
||||
children])))
|
||||
|
||||
(defn selectable-text-input-manager
|
||||
[]
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
(.-RNSelectableTextInputManager ^js (.-NativeModules react-native))))
|
||||
|
||||
(defonce rn-selectable-text-input
|
||||
(reagent/adapt-react-class (.requireNativeComponent react-native "RNSelectableTextInput")))
|
||||
|
||||
(declare first-level-menu-items second-level-menu-items)
|
||||
|
||||
(defn update-input-text
|
||||
@@ -269,24 +259,24 @@
|
||||
;https://lightrun.com/answers/facebook-react-native-textinput-controlled-selection-broken-on-both-ios-and-android
|
||||
;use native invoke instead! do not use setNativeProps! e.g. (.setNativeProps ^js text-input (clj->js
|
||||
;{:selection {:start selection-start :end selection-end}}))
|
||||
(let [manager (selectable-text-input-manager)]
|
||||
(let [manager (rn/selectable-text-input-manager)]
|
||||
(oops/ocall manager :setSelection text-input-handle selection-start selection-end)))
|
||||
|
||||
(def first-level-menus
|
||||
{:cut (fn [{:keys [content] :as params}]
|
||||
(let [new-text (calculate-input-text params "")]
|
||||
(react/copy-to-clipboard content)
|
||||
(clipboard/set-string content)
|
||||
(update-input-text params new-text)))
|
||||
|
||||
:copy-to-clipboard (fn [{:keys [content]}]
|
||||
(react/copy-to-clipboard content))
|
||||
(clipboard/set-string content))
|
||||
|
||||
:paste (fn [params]
|
||||
(let [callback (fn [paste-content]
|
||||
(let [content (string/trim paste-content)
|
||||
new-text (calculate-input-text params content)]
|
||||
(update-input-text params new-text)))]
|
||||
(react/get-from-clipboard callback)))
|
||||
(clipboard/get-string callback)))
|
||||
|
||||
:biu (fn [{:keys [first-level text-input-handle menu-items selection-start
|
||||
selection-end]}]
|
||||
@@ -340,7 +330,7 @@
|
||||
menu-items (reagent/atom first-level-menu-items)
|
||||
first-level (reagent/atom true)
|
||||
selection-event (atom nil)
|
||||
manager (selectable-text-input-manager)]
|
||||
manager (rn/selectable-text-input-manager)]
|
||||
(reagent/create-class
|
||||
{:component-did-mount
|
||||
(fn [this]
|
||||
@@ -395,6 +385,6 @@
|
||||
:style (dissoc style :margin-horizontal)
|
||||
:on-selection-change on-selection-change
|
||||
:on-selection on-selection})]
|
||||
[rn-selectable-text-input {:menuItems @menu-items :style style}
|
||||
[rn/selectable-text-input {:menuItems @menu-items :style style}
|
||||
[rn/text-input props
|
||||
children]]))})))
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
(ns status-im.ui2.screens.chat.pin-limit-popover.style
|
||||
(:require [quo2.foundations.colors :as colors]))
|
||||
|
||||
(defn pin-popover
|
||||
[width]
|
||||
{:width (- width 16)
|
||||
:margin-left 8
|
||||
:background-color (colors/theme-colors colors/neutral-80-opa-90 colors/white-opa-90)
|
||||
:flex-direction :row
|
||||
:border-radius 16
|
||||
:padding 12})
|
||||
|
||||
(defn pin-alert-container
|
||||
[]
|
||||
{:background-color (colors/theme-colors colors/neutral-80-opa-20 colors/white-opa-40)
|
||||
:width 36
|
||||
:height 36
|
||||
:border-radius 18
|
||||
:justify-content :center
|
||||
:align-items :center})
|
||||
|
||||
(def pin-alert-circle
|
||||
{:width 18
|
||||
:height 18
|
||||
:border-radius 9
|
||||
:border-color colors/danger-50-opa-40
|
||||
:border-width 1
|
||||
:justify-content :center
|
||||
:align-items :center})
|
||||
|
||||
(def view-pinned-messages
|
||||
{:background-color colors/primary-60
|
||||
:border-radius 8
|
||||
:justify-content :center
|
||||
:align-items :center
|
||||
:padding-horizontal 8
|
||||
:padding-vertical 4
|
||||
:align-self :flex-start
|
||||
:margin-top 10})
|
||||
@@ -1,63 +0,0 @@
|
||||
(ns status-im.ui2.screens.chat.pin-limit-popover.view
|
||||
(:require [utils.i18n :as i18n]
|
||||
[quo.react :as react]
|
||||
[quo2.core :as quo]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[status-im.ui2.screens.chat.pin-limit-popover.style :as style]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
;; TODO (flexsurfer) this should be an in-app notification component in quo2
|
||||
;; https://github.com/status-im/status-mobile/issues/14527
|
||||
(defn pin-limit-popover
|
||||
[chat-id]
|
||||
[:f>
|
||||
(fn []
|
||||
(let [width (rf/sub [:dimensions/window-width])
|
||||
show-pin-limit-modal? (rf/sub [:chats/pin-modal chat-id])
|
||||
opacity-animation (reanimated/use-shared-value 0)
|
||||
z-index-animation (reanimated/use-shared-value -1)]
|
||||
(react/effect!
|
||||
#(do
|
||||
(reanimated/set-shared-value opacity-animation
|
||||
(reanimated/with-timing (if show-pin-limit-modal? 1 0)))
|
||||
(reanimated/set-shared-value z-index-animation
|
||||
(reanimated/with-timing (if show-pin-limit-modal? 10 -1)))))
|
||||
(when show-pin-limit-modal?
|
||||
[reanimated/view
|
||||
{:style (reanimated/apply-animations-to-style
|
||||
{:opacity opacity-animation
|
||||
:z-index z-index-animation}
|
||||
(style/pin-popover width))
|
||||
:accessibility-label :pin-limit-popover}
|
||||
[rn/view {:style (style/pin-alert-container)}
|
||||
[rn/view {:style style/pin-alert-circle}
|
||||
[rn/text {:style {:color colors/danger-50}} "!"]]]
|
||||
[rn/view {:style {:margin-left 8}}
|
||||
[quo/text {:weight :semi-bold :color (colors/theme-colors colors/white colors/neutral-100)}
|
||||
(i18n/label :t/cannot-pin-title)]
|
||||
[quo/text {:size :paragraph-2 :color (colors/theme-colors colors/white colors/neutral-100)}
|
||||
(i18n/label :t/cannot-pin-desc)]
|
||||
[rn/touchable-opacity
|
||||
{:accessibility-label :view-pinned-messages
|
||||
:active-opacity 1
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:pin-message/hide-pin-limit-modal chat-id])
|
||||
(rf/dispatch [:bottom-sheet/show-sheet :pinned-messages-list
|
||||
chat-id]))
|
||||
:style style/view-pinned-messages}
|
||||
[quo/text {:size :paragraph-2 :weight :medium :color colors/white}
|
||||
(i18n/label :t/view-pinned-messages)]]]
|
||||
[rn/touchable-opacity
|
||||
{:accessibility-label :close-pin-limit-popover
|
||||
:active-opacity 1
|
||||
:on-press #(rf/dispatch [:pin-message/hide-pin-limit-modal chat-id])
|
||||
:style {:position :absolute
|
||||
:top 16
|
||||
:right 16}}
|
||||
[quo/icon :i/close
|
||||
{:color (colors/theme-colors colors/white colors/neutral-100)
|
||||
:size 12}]]])))])
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
[utils.datetime :as datetime]
|
||||
[status-im.utils.platform :as platform]
|
||||
[status-im.utils.types :as types]
|
||||
[status-im2.setup.log :as log]))
|
||||
[status-im2.common.log :as log]))
|
||||
|
||||
(def report-email "error-reports@status.im")
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
(log/info "universal-links: handling private chat" chat-id)
|
||||
(when chat-id
|
||||
(if-not (new-chat.db/own-public-key? db chat-id)
|
||||
(chat/start-chat cofx chat-id nil)
|
||||
{:dispatch [:chat.ui/start-chat chat-id]}
|
||||
{:utils/show-popup {:title (i18n/label :t/unable-to-read-this-code)
|
||||
:content (i18n/label :t/can-not-add-yourself)}})))
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
(rf/defn handle-community-chat
|
||||
[cofx {:keys [chat-id]}]
|
||||
(log/info "universal-links: handling community chat" chat-id)
|
||||
{:dispatch [:chat.ui/navigate-to-chat-nav2 chat-id]})
|
||||
{:dispatch [:chat/navigate-to-chat chat-id]})
|
||||
|
||||
(rf/defn handle-public-chat
|
||||
[cofx {:keys [topic]}]
|
||||
|
||||
@@ -83,6 +83,16 @@
|
||||
(and @expanded? (< end-pan-y collapse-threshold))
|
||||
(reset! expanded? false))))))))
|
||||
|
||||
(defn handle-comp
|
||||
[window-width]
|
||||
[rn/view
|
||||
{:style {:width window-width
|
||||
:position :absolute
|
||||
:background-color :transparent
|
||||
:top 0
|
||||
:height 20}}
|
||||
[rn/view {:style (styles/handle)}]])
|
||||
|
||||
(defn bottom-sheet
|
||||
[props children]
|
||||
(let [{on-cancel :on-cancel
|
||||
@@ -140,7 +150,9 @@
|
||||
expandable?
|
||||
show-bottom-sheet?
|
||||
expanded?
|
||||
close-bottom-sheet)]
|
||||
close-bottom-sheet)
|
||||
handle-comp [gesture/gesture-detector {:gesture bottom-sheet-gesture}
|
||||
[handle-comp window-width]]]
|
||||
|
||||
(react/effect! #(do
|
||||
(cond
|
||||
@@ -200,28 +212,27 @@
|
||||
{:style (reanimated/apply-animations-to-style
|
||||
{:opacity bg-opacity}
|
||||
styles/backdrop)}]]
|
||||
|
||||
[gesture/gesture-detector {:gesture bottom-sheet-gesture}
|
||||
[reanimated/view
|
||||
{:style (reanimated/apply-animations-to-style
|
||||
{:transform [{:translateY translate-y}]}
|
||||
{:width window-width
|
||||
:height window-height})}
|
||||
[rn/view {:style styles/container}
|
||||
(when selected-item
|
||||
[rn/view {:style (styles/selected-background)}
|
||||
[selected-item]])
|
||||
[rn/view {:style (styles/background)}
|
||||
[rn/keyboard-avoiding-view
|
||||
{:behaviour (if platform/ios? :padding :height)
|
||||
:style {:flex 1}}
|
||||
[rn/view
|
||||
{:style (styles/content-style insets)
|
||||
:on-layout (when-not (and
|
||||
(some? @content-height)
|
||||
(> @content-height 0))
|
||||
on-content-layout)}
|
||||
children]]
|
||||
|
||||
(when show-handle?
|
||||
[rn/view {:style (styles/handle)}])]]]]]))])]))
|
||||
(cond->> [reanimated/view
|
||||
{:style (reanimated/apply-animations-to-style
|
||||
{:transform [{:translateY translate-y}]}
|
||||
{:width window-width
|
||||
:height window-height})}
|
||||
[rn/view {:style styles/container}
|
||||
(when selected-item
|
||||
[rn/view {:style (styles/selected-background)}
|
||||
[selected-item]])
|
||||
[rn/view {:style (styles/background)}
|
||||
[rn/keyboard-avoiding-view
|
||||
{:behaviour (if platform/ios? :padding :height)
|
||||
:style {:flex 1}}
|
||||
[rn/view
|
||||
{:style (styles/content-style insets)
|
||||
:on-layout (when-not (and
|
||||
(some? @content-height)
|
||||
(> @content-height 0))
|
||||
on-content-layout)}
|
||||
children]]
|
||||
(when show-handle?
|
||||
handle-comp)]]]
|
||||
(not show-handle?)
|
||||
(conj [gesture/gesture-detector {:gesture bottom-sheet-gesture}]))]))])]))
|
||||
|
||||