1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Merge pull request #110 from tooot-app/main

Nightly 210419
This commit is contained in:
xmflsct 2021-04-19 22:59:53 +02:00 committed by GitHub
commit f8fe496c33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 142 additions and 82 deletions

View File

@ -15,8 +15,8 @@ GEM
artifactory (3.0.15) artifactory (3.0.15)
atomos (0.1.3) atomos (0.1.3)
aws-eventstream (1.1.1) aws-eventstream (1.1.1)
aws-partitions (1.436.0) aws-partitions (1.445.0)
aws-sdk-core (3.113.0) aws-sdk-core (3.114.0)
aws-eventstream (~> 1, >= 1.0.2) aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0) aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1) aws-sigv4 (~> 1.1)
@ -24,7 +24,7 @@ GEM
aws-sdk-kms (1.43.0) aws-sdk-kms (1.43.0)
aws-sdk-core (~> 3, >= 3.112.0) aws-sdk-core (~> 3, >= 3.112.0)
aws-sigv4 (~> 1.1) aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.93.0) aws-sdk-s3 (1.93.1)
aws-sdk-core (~> 3, >= 3.112.0) aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-kms (~> 1) aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1) aws-sigv4 (~> 1.1)
@ -74,8 +74,8 @@ GEM
commander-fastlane (4.4.6) commander-fastlane (4.4.6)
highline (~> 1.7.2) highline (~> 1.7.2)
concurrent-ruby (1.1.8) concurrent-ruby (1.1.8)
connection_pool (2.2.5)
declarative (0.0.20) declarative (0.0.20)
declarative-option (0.1.0)
digest-crc (0.6.3) digest-crc (0.6.3)
rake (>= 12.0.0, < 14.0.0) rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701) domain_name (0.5.20190701)
@ -85,19 +85,25 @@ GEM
escape (0.0.4) escape (0.0.4)
ethon (0.12.0) ethon (0.12.0)
ffi (>= 1.3.0) ffi (>= 1.3.0)
excon (0.79.0) excon (0.80.1)
faraday (1.3.0) faraday (1.4.0)
faraday-excon (~> 1.0)
faraday-net_http (~> 1.0) faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
multipart-post (>= 1.2, < 3) multipart-post (>= 1.2, < 3)
ruby2_keywords ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7) faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0) faraday (>= 0.8.0)
http-cookie (~> 1.0.0) http-cookie (~> 1.0.0)
faraday-excon (1.0.0)
excon (>= 0.27.4)
faraday-net_http (1.0.1) faraday-net_http (1.0.1)
faraday-net_http_persistent (1.0.3)
net-http-persistent (>= 3.1)
faraday_middleware (1.0.0) faraday_middleware (1.0.0)
faraday (~> 1.0) faraday (~> 1.0)
fastimage (2.2.3) fastimage (2.2.3)
fastlane (2.179.0) fastlane (2.180.1)
CFPropertyList (>= 2.3, < 4.0.0) CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0) addressable (>= 2.3, < 3.0.0)
artifactory (~> 3.0) artifactory (~> 3.0)
@ -161,7 +167,7 @@ GEM
rexml rexml
signet (~> 0.14) signet (~> 0.14)
webrick webrick
google-apis-iamcredentials_v1 (0.2.0) google-apis-iamcredentials_v1 (0.3.0)
google-apis-core (~> 0.1) google-apis-core (~> 0.1)
google-apis-storage_v1 (0.3.0) google-apis-storage_v1 (0.3.0)
google-apis-core (~> 0.1) google-apis-core (~> 0.1)
@ -179,7 +185,7 @@ GEM
google-cloud-core (~> 1.2) google-cloud-core (~> 1.2)
googleauth (~> 0.9) googleauth (~> 0.9)
mini_mime (~> 1.0) mini_mime (~> 1.0)
googleauth (0.16.0) googleauth (0.16.1)
faraday (>= 0.17.3, < 2.0) faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0) jwt (>= 1.4, < 3.0)
memoist (~> 0.16) memoist (~> 0.16)
@ -197,7 +203,7 @@ GEM
jwt (2.2.2) jwt (2.2.2)
memoist (0.16.2) memoist (0.16.2)
mini_magick (4.11.0) mini_magick (4.11.0)
mini_mime (1.0.3) mini_mime (1.1.0)
minitest (5.14.4) minitest (5.14.4)
molinillo (0.6.6) molinillo (0.6.6)
multi_json (1.15.0) multi_json (1.15.0)
@ -205,17 +211,19 @@ GEM
nanaimo (0.3.0) nanaimo (0.3.0)
nap (1.1.0) nap (1.1.0)
naturally (2.2.1) naturally (2.2.1)
net-http-persistent (4.0.1)
connection_pool (~> 2.2)
netrc (0.11.0) netrc (0.11.0)
os (1.1.1) os (1.1.1)
plist (3.6.0) plist (3.6.0)
public_suffix (4.0.6) public_suffix (4.0.6)
rake (13.0.3) rake (13.0.3)
representable (3.0.4) representable (3.1.1)
declarative (< 0.1.0) declarative (< 0.1.0)
declarative-option (< 0.2.0) trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0) uber (< 0.2.0)
retriable (3.1.2) retriable (3.1.2)
rexml (3.2.4) rexml (3.2.5)
rouge (2.0.7) rouge (2.0.7)
ruby-macho (1.4.0) ruby-macho (1.4.0)
ruby2_keywords (0.0.4) ruby2_keywords (0.0.4)
@ -234,6 +242,7 @@ GEM
terminal-table (1.8.0) terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1) unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6) thread_safe (0.3.6)
trailblazer-option (0.1.1)
tty-cursor (0.7.1) tty-cursor (0.7.1)
tty-screen (0.8.1) tty-screen (0.8.1)
tty-spinner (0.9.3) tty-spinner (0.9.3)

View File

@ -21,10 +21,11 @@
## OTA release channels ## OTA release channels
* `MAJOR-environment`. Environments include `production`, `staging` and `development`. * `MAJOR-environment`. Environments include `release`, `candidate` and `development`.
## Major versions mapping to native module versions ## Major versions mapping to native module versions
| Major version | Native module version | | Major version | Native module version | Expo version |
| :-----------: | :-------------------: | | :-----------: | :-------------------: | :----------: |
| `0` | `210201` | | `0` | `210201` | `40.0.0` |
| `1` | `210317` | `40.0.0` |

View File

@ -1,4 +1,4 @@
languages(['zh-Hans']) languages(['zh-Hans', 'en-US'])
name({ name({
'default' => "tooot" 'default' => "tooot"
@ -12,6 +12,11 @@ privacy_url({
support_url({ support_url({
'default' => "https://tooot.app" 'default' => "https://tooot.app"
}) })
copyright("#{Time.now.year} ©️ xmflsct") copyright("#{Time.now.year} ©️ xmflsct")
primary_category("SOCIAL_NETWORKING") primary_category("SOCIAL_NETWORKING")
automatic_release(false)
force(true)
precheck_include_in_app_purchases(false)
submit_for_review(true)
overwrite_screenshots(true)

View File

@ -1,4 +1,4 @@
fastlane_version "2.179.0" fastlane_version "2.180.1"
skip_docs skip_docs
ensure_env_vars( ensure_env_vars(
@ -106,12 +106,7 @@ private_lane :build_ios do
output_directory: BUILD_DIRECTORY, output_directory: BUILD_DIRECTORY,
silent: true silent: true
) )
upload_to_app_store( upload_to_app_store( ipa: IPA_FILE, app_version: VERSION )
force: true,
ipa: IPA_FILE,
submit_for_review: true,
automatic_release: false
)
else else
if !is_ci if !is_ci
match( type: "development", readonly: true ) match( type: "development", readonly: true )

View File

@ -1 +1 @@
../../default/description.txt ../../en-US/description.txt

View File

@ -1 +1 @@
../../../../../screenshots/en_US/0_65.png ../../../../../screenshots/en-US/0_65.png

View File

@ -1 +1 @@
../../../../../screenshots/en_US/1_65.png ../../../../../screenshots/en-US/1_65.png

View File

@ -1 +1 @@
../../../../../screenshots/en_US/2_65.png ../../../../../screenshots/en-US/2_65.png

View File

@ -1 +1 @@
../../../../../screenshots/en_US/3_65.png ../../../../../screenshots/en-US/3_65.png

View File

@ -1 +1 @@
../../default/subtitle.txt ../../en-US/subtitle.txt

View File

@ -1,5 +0,0 @@
tooot is an open source, simple yet elegant Mastodon mobile client.
A Mastodon (https://joinmastodon.org/) account is required to use this app.
If you have suggestions, please reach out to @tooot@xmflsct.com or support@tooot.ap.

View File

@ -0,0 +1 @@
../en-US/description.txt

View File

@ -0,0 +1 @@
../en-US/release_notes.txt

View File

@ -1 +0,0 @@
Open source Mastodon client

View File

@ -0,0 +1 @@
../en-US/subtitle.txt

View File

@ -0,0 +1,5 @@
tooot is an open source, simple yet elegant Mastodon mobile client.
A Mastodon (https://joinmastodon.org/) account is required to use this app.
If you have suggestions, please reach out to @tooot@xmflsct.com or support@tooot.ap.

View File

@ -0,0 +1 @@

View File

@ -0,0 +1 @@
Open source Mastodon client

View File

@ -1 +1 @@
开源毛象客户端 开源毛象客户端

View File

Before

Width:  |  Height:  |  Size: 560 KiB

After

Width:  |  Height:  |  Size: 560 KiB

View File

Before

Width:  |  Height:  |  Size: 723 KiB

After

Width:  |  Height:  |  Size: 723 KiB

View File

Before

Width:  |  Height:  |  Size: 356 KiB

After

Width:  |  Height:  |  Size: 356 KiB

View File

Before

Width:  |  Height:  |  Size: 462 KiB

After

Width:  |  Height:  |  Size: 462 KiB

View File

Before

Width:  |  Height:  |  Size: 388 KiB

After

Width:  |  Height:  |  Size: 388 KiB

View File

Before

Width:  |  Height:  |  Size: 450 KiB

After

Width:  |  Height:  |  Size: 450 KiB

View File

Before

Width:  |  Height:  |  Size: 385 KiB

After

Width:  |  Height:  |  Size: 385 KiB

View File

Before

Width:  |  Height:  |  Size: 476 KiB

After

Width:  |  Height:  |  Size: 476 KiB

View File

@ -0,0 +1,11 @@
/*
InfoPlist.strings
tooot
Created by Zheng Zhiyuan (SEBD) on 2021-04-16.
*/
"NSCameraUsageDescription" = "Allow tooot to capture photo or video and attach it to your toot";
"NSPhotoLibraryAddUsageDescription" = "Allow tooot to save an image to your camera roll";
"NSPhotoLibraryUsageDescription" = "Allow tooot to access your camera roll to attach photos or videos to your toot";

View File

@ -13,6 +13,7 @@
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; }; 3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
5E36538325C9B8BD009F93EE /* RootViewColor.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5E36538225C9B8BD009F93EE /* RootViewColor.xcassets */; }; 5E36538325C9B8BD009F93EE /* RootViewColor.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5E36538225C9B8BD009F93EE /* RootViewColor.xcassets */; };
5EE088C926297820007E5FEC /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5EE088CB26297820007E5FEC /* InfoPlist.strings */; };
5EE44DD62600124E00A9BCED /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EE44DD52600124E00A9BCED /* File.swift */; }; 5EE44DD62600124E00A9BCED /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EE44DD52600124E00A9BCED /* File.swift */; };
96905EF65AED1B983A6B3ABC /* libPods-tooot.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-tooot.a */; }; 96905EF65AED1B983A6B3ABC /* libPods-tooot.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-tooot.a */; };
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; }; BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
@ -30,6 +31,8 @@
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = tooot/main.m; sourceTree = "<group>"; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = tooot/main.m; sourceTree = "<group>"; };
58EEBF8E8E6FB1BC6CAF49B5 /* libPods-tooot.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-tooot.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-tooot.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-tooot.a"; sourceTree = BUILT_PRODUCTS_DIR; };
5E36538225C9B8BD009F93EE /* RootViewColor.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = RootViewColor.xcassets; path = tooot/RootViewColor.xcassets; sourceTree = "<group>"; }; 5E36538225C9B8BD009F93EE /* RootViewColor.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = RootViewColor.xcassets; path = tooot/RootViewColor.xcassets; sourceTree = "<group>"; };
5EE088CA26297820007E5FEC /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
5EE088CD2629786B007E5FEC /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
5EE44DD42600124E00A9BCED /* tooot-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "tooot-Bridging-Header.h"; sourceTree = "<group>"; }; 5EE44DD42600124E00A9BCED /* tooot-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "tooot-Bridging-Header.h"; sourceTree = "<group>"; };
5EE44DD52600124E00A9BCED /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; }; 5EE44DD52600124E00A9BCED /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
6C2E3173556A471DD304B334 /* Pods-tooot.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tooot.debug.xcconfig"; path = "Target Support Files/Pods-tooot/Pods-tooot.debug.xcconfig"; sourceTree = "<group>"; }; 6C2E3173556A471DD304B334 /* Pods-tooot.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-tooot.debug.xcconfig"; path = "Target Support Files/Pods-tooot/Pods-tooot.debug.xcconfig"; sourceTree = "<group>"; };
@ -67,6 +70,7 @@
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */, AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */,
5E36538225C9B8BD009F93EE /* RootViewColor.xcassets */, 5E36538225C9B8BD009F93EE /* RootViewColor.xcassets */,
B96B72E5384D44A7B240B27E /* GoogleService-Info.plist */, B96B72E5384D44A7B240B27E /* GoogleService-Info.plist */,
5EE088CB26297820007E5FEC /* InfoPlist.strings */,
); );
name = tooot; name = tooot;
sourceTree = "<group>"; sourceTree = "<group>";
@ -177,6 +181,7 @@
knownRegions = ( knownRegions = (
en, en,
Base, Base,
"zh-Hans",
); );
mainGroup = 83CBB9F61A601CBA00E9B192; mainGroup = 83CBB9F61A601CBA00E9B192;
productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
@ -194,6 +199,7 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
5E36538325C9B8BD009F93EE /* RootViewColor.xcassets in Resources */, 5E36538325C9B8BD009F93EE /* RootViewColor.xcassets in Resources */,
5EE088C926297820007E5FEC /* InfoPlist.strings in Resources */,
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */, BB2F792D24A3F905000567C9 /* Expo.plist in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
@ -321,6 +327,15 @@
path = tooot; path = tooot;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
5EE088CB26297820007E5FEC /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
5EE088CA26297820007E5FEC /* en */,
5EE088CD2629786B007E5FEC /* zh-Hans */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */ /* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */

View File

@ -50,16 +50,16 @@
</dict> </dict>
</dict> </dict>
</dict> </dict>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) DOES NOT need microphone permission. Please reject this request.</string>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>Give $(PRODUCT_NAME) permission to access your camera</string> <string>Allow $(PRODUCT_NAME) to capture photo or video and attach it to your toot</string>
<key>NSLocationWhenInUseUsageDescription</key> <key>NSLocationWhenInUseUsageDescription</key>
<string/> <string/>
<key>NSMicrophoneUsageDescription</key>
<string>Give $(PRODUCT_NAME) permission to use your microphone</string>
<key>NSPhotoLibraryAddUsageDescription</key> <key>NSPhotoLibraryAddUsageDescription</key>
<string>Give $(PRODUCT_NAME) permission to save photos</string> <string>Allow $(PRODUCT_NAME) to save an image to your camera roll</string>
<key>NSPhotoLibraryUsageDescription</key> <key>NSPhotoLibraryUsageDescription</key>
<string>Give $(PRODUCT_NAME) permission to save photos</string> <string>Allow $(PRODUCT_NAME) to access your camera roll to attach photos or videos to your toot</string>
<key>UILaunchStoryboardName</key> <key>UILaunchStoryboardName</key>
<string>SplashScreen</string> <string>SplashScreen</string>
<key>UIRequiredDeviceCapabilities</key> <key>UIRequiredDeviceCapabilities</key>

View File

@ -0,0 +1,11 @@
/*
InfoPlist.strings
tooot
Created by Zheng Zhiyuan (SEBD) on 2021-04-16.
*/
"NSCameraUsageDescription" = "允许tooot拍摄图片或视频以添加嘟文附件";
"NSPhotoLibraryAddUsageDescription" = "允许tooot保存图片至相册";
"NSPhotoLibraryUsageDescription" = "允许tooot读取相册图片或视频以添加嘟文附件";

View File

@ -4,7 +4,7 @@
"native": "210317", "native": "210317",
"major": 1, "major": 1,
"minor": 0, "minor": 0,
"patch": 0, "patch": 1,
"expo": "40.0.0" "expo": "40.0.0"
}, },
"description": "tooot app for Mastodon", "description": "tooot app for Mastodon",

View File

@ -57,6 +57,7 @@ declare namespace Nav {
'Screen-ImagesViewer': { 'Screen-ImagesViewer': {
imageUrls: { imageUrls: {
id: Mastodon.Attachment['id'] id: Mastodon.Attachment['id']
preview_url: Mastodon.AttachmentImage['preview_url']
url: Mastodon.AttachmentImage['url'] url: Mastodon.AttachmentImage['url']
remote_url?: Mastodon.AttachmentImage['remote_url'] remote_url?: Mastodon.AttachmentImage['remote_url']
blurhash: Mastodon.AttachmentImage['blurhash'] blurhash: Mastodon.AttachmentImage['blurhash']

View File

@ -67,8 +67,8 @@ const GracefullyImage = React.memo(
setImageLoaded(true) setImageLoaded(true)
setImageDimensions && setImageDimensions &&
setImageDimensions({ setImageDimensions({
width: nativeEvent.width, width: nativeEvent.source.width,
height: nativeEvent.height height: nativeEvent.source.height
}) })
}, },
[source.uri] [source.uri]
@ -83,15 +83,20 @@ const GracefullyImage = React.memo(
() => () =>
uri.preview && !imageLoaded ? ( uri.preview && !imageLoaded ? (
<Image <Image
fadeDuration={0}
source={{ uri: uri.preview }} source={{ uri: uri.preview }}
style={[{ flex: 1 }, imageStyle]} style={[
styles.placeholder,
{ backgroundColor: theme.shimmerDefault }
]}
/> />
) : null, ) : null,
[imageLoaded] []
) )
const originalView = useMemo( const originalView = useMemo(
() => ( () => (
<Image <Image
fadeDuration={0}
source={source} source={source}
style={[{ flex: 1 }, imageStyle]} style={[{ flex: 1 }, imageStyle]}
onLoad={onLoad} onLoad={onLoad}
@ -104,12 +109,19 @@ const GracefullyImage = React.memo(
if (hidden || !imageLoaded) { if (hidden || !imageLoaded) {
if (blurhash) { if (blurhash) {
return ( return (
<Blurhash decodeAsync blurhash={blurhash} style={styles.blurhash} /> <Blurhash
decodeAsync
blurhash={blurhash}
style={styles.placeholder}
/>
) )
} else { } else {
return ( return (
<View <View
style={[styles.blurhash, { backgroundColor: theme.disabled }]} style={[
styles.placeholder,
{ backgroundColor: theme.shimmerDefault }
]}
/> />
) )
} }
@ -146,7 +158,7 @@ const GracefullyImage = React.memo(
) )
const styles = StyleSheet.create({ const styles = StyleSheet.create({
blurhash: { placeholder: {
width: '100%', width: '100%',
height: '100%', height: '100%',
position: 'absolute' position: 'absolute'

View File

@ -128,7 +128,8 @@ const renderNode = ({
}) })
}} }}
> >
{content || (showFullLink ? href : domain[1])} {(content && content !== href && content) ||
(showFullLink ? href : domain[1])}
{!shouldBeTag ? ( {!shouldBeTag ? (
<Icon <Icon
color={theme.blue} color={theme.blue}

View File

@ -47,6 +47,7 @@ const TimelineAttachment = React.memo(
case 'image': case 'image':
imageUrls.push({ imageUrls.push({
id: attachment.id, id: attachment.id,
preview_url: attachment.preview_url,
url: attachment.url, url: attachment.url,
remote_url: attachment.remote_url, remote_url: attachment.remote_url,
blurhash: attachment.blurhash, blurhash: attachment.blurhash,
@ -107,6 +108,7 @@ const TimelineAttachment = React.memo(
) { ) {
imageUrls.push({ imageUrls.push({
id: attachment.id, id: attachment.id,
preview_url: attachment.preview_url,
url: attachment.url, url: attachment.url,
remote_url: attachment.remote_url, remote_url: attachment.remote_url,
blurhash: attachment.blurhash, blurhash: attachment.blurhash,

View File

@ -90,10 +90,10 @@ const ImageItem = ({
children={ children={
<GracefullyImage <GracefullyImage
uri={{ uri={{
preview: imageSrc.preview_url,
original: imageSrc.url, original: imageSrc.url,
remote: imageSrc.remote_url remote: imageSrc.remote_url
}} }}
blurhash={imageSrc.blurhash}
{...((!imageSrc.width || !imageSrc.height) && { {...((!imageSrc.width || !imageSrc.height) && {
setImageDimensions setImageDimensions
})} })}

View File

@ -145,10 +145,10 @@ const ImageItem = ({
children={ children={
<GracefullyImage <GracefullyImage
uri={{ uri={{
preview: imageSrc.preview_url,
original: imageSrc.url, original: imageSrc.url,
remote: imageSrc.remote_url remote: imageSrc.remote_url
}} }}
blurhash={imageSrc.blurhash}
{...((!imageSrc.width || !imageSrc.height) && { {...((!imageSrc.width || !imageSrc.height) && {
setImageDimensions setImageDimensions
})} })}

View File

@ -6,7 +6,9 @@ const saveIos = async (
image: Nav.RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] image: Nav.RootStackParamList['Screen-ImagesViewer']['imageUrls'][0]
) => { ) => {
CameraRoll.save(image.url) CameraRoll.save(image.url)
.then(() => haptics('Success')) .then(() => {
haptics('Success')
})
.catch(() => { .catch(() => {
if (image.remote_url) { if (image.remote_url) {
CameraRoll.save(image.remote_url) CameraRoll.save(image.remote_url)

View File

@ -11,15 +11,19 @@ import {
useSafeAreaInsets useSafeAreaInsets
} from 'react-native-safe-area-context' } from 'react-native-safe-area-context'
import ImageViewer from './ImageViewer/Root' import ImageViewer from './ImageViewer/Root'
import { saveAndroid, saveIos } from './ImageViewer/save'
const saveImage = async ( const saveImage = async (
image: Nav.RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] image: Nav.RootStackParamList['Screen-ImagesViewer']['imageUrls'][0]
) => { ) => {
const save = require('./ImageViewer/save') switch (Platform.OS) {
Platform.select({ case 'ios':
ios: save.saveIos(image), saveIos(image)
android: save.saveAndroid(image) break
}) case 'android':
saveAndroid(image)
break
}
} }
const HeaderComponent = React.memo( const HeaderComponent = React.memo(
@ -113,6 +117,7 @@ const ScreenImagesViewer = ({
navigation navigation
}: ScreenImagesViewerProp) => { }: ScreenImagesViewerProp) => {
if (imageUrls.length === 0) { if (imageUrls.length === 0) {
navigation.goBack()
return null return null
} }

View File

@ -2,7 +2,6 @@ import analytics from '@components/analytics'
import Icon from '@components/Icon' import Icon from '@components/Icon'
import { MenuContainer, MenuRow } from '@components/Menu' import { MenuContainer, MenuRow } from '@components/Menu'
import { useNavigation } from '@react-navigation/native' import { useNavigation } from '@react-navigation/native'
import { useSearchQuery } from '@utils/queryHooks/search'
import { StyleConstants } from '@utils/styles/constants' import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager' import { useTheme } from '@utils/styles/ThemeManager'
import * as Updates from 'expo-updates' import * as Updates from 'expo-updates'
@ -20,11 +19,6 @@ const SettingsTooot: React.FC = () => {
const { theme } = useTheme() const { theme } = useTheme()
const { t } = useTranslation('screenTabs') const { t } = useTranslation('screenTabs')
const { isLoading, data } = useSearchQuery({
term: '@tooot@xmflsct.com',
options: { enabled: instanceActive !== -1 }
})
return ( return (
<MenuContainer> <MenuContainer>
<MenuRow <MenuRow
@ -43,7 +37,7 @@ const SettingsTooot: React.FC = () => {
}} }}
/> />
{__DEV__ || {__DEV__ ||
['production', 'development'].some(channel => ['release', 'development'].some(channel =>
Updates.releaseChannel?.includes(channel) Updates.releaseChannel?.includes(channel)
) ? ( ) ? (
<MenuRow <MenuRow
@ -66,7 +60,6 @@ const SettingsTooot: React.FC = () => {
) : null} ) : null}
<MenuRow <MenuRow
title={t('me.settings.contact.heading')} title={t('me.settings.contact.heading')}
loading={isLoading}
content={ content={
<Icon <Icon
name='Mail' name='Mail'
@ -76,15 +69,10 @@ const SettingsTooot: React.FC = () => {
} }
iconBack='ChevronRight' iconBack='ChevronRight'
onPress={() => { onPress={() => {
const foundAccounts = data?.accounts.filter( if (instanceActive !== -1) {
account =>
account.acct === 'tooot@xmflsct.com' ||
account.url === 'https://social.xmflsct.com/@tooot'
)
if (foundAccounts?.length === 1) {
navigation.navigate('Screen-Compose', { navigation.navigate('Screen-Compose', {
type: 'conversation', type: 'conversation',
accts: [foundAccounts[0].acct] accts: ['tooot@xmflsct.com']
}) })
} else { } else {
WebBrowser.openBrowserAsync('https://social.xmflsct.com/@tooot') WebBrowser.openBrowserAsync('https://social.xmflsct.com/@tooot')

View File

@ -7,8 +7,7 @@ const audio = () => {
playsInSilentModeIOS: true, playsInSilentModeIOS: true,
interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX, interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX,
interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX, interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX,
shouldDuckAndroid: true, shouldDuckAndroid: true
playThroughEarpieceAndroid: true
}) })
} }

View File

@ -40,7 +40,7 @@ const contextsSlice = createSlice({
initialState: contextsInitialState as ContextsState, initialState: contextsInitialState as ContextsState,
reducers: { reducers: {
updateStoreReview: (state, action: PayloadAction<1>) => { updateStoreReview: (state, action: PayloadAction<1>) => {
if (Updates.releaseChannel.includes('production')) { if (Updates.releaseChannel.includes('release')) {
state.storeReview.current = state.storeReview.current + action.payload state.storeReview.current = state.storeReview.current + action.payload
if (state.storeReview.current === state.storeReview.context) { if (state.storeReview.current === state.storeReview.context) {
StoreReview.isAvailableAsync().then(() => StoreReview.requestReview()) StoreReview.isAvailableAsync().then(() => StoreReview.requestReview())