Skip to content

Commit

Permalink
Merge branch 'main' into candidate
Browse files Browse the repository at this point in the history
  • Loading branch information
xmflsct committed Apr 17, 2023
2 parents d8a14cf + 3620202 commit 7405718
Show file tree
Hide file tree
Showing 42 changed files with 1,319 additions and 1,248 deletions.
@@ -0,0 +1,38 @@
diff --git a/src/zoom.tsx b/src/zoom.tsx
index 70ce1c8d6a43e711f06b93d1eda3b44a3ad9a659..cdc2713470f2d332b8bf3e9c97e38fd9b78281df 100644
--- a/src/zoom.tsx
+++ b/src/zoom.tsx
@@ -4,6 +4,7 @@ import Animated, {
useSharedValue,
useAnimatedStyle,
useDerivedValue,
+ withDecay,
withTiming,
cancelAnimation,
runOnJS,
@@ -120,11 +121,22 @@ export function Zoom(props: Props) {
}
}
})
- .onEnd(() => {
+ .onEnd((event) => {
if (isPinching.value || !isZoomed.value) return;

- panTranslateX.value = 0;
- panTranslateY.value = 0;
+ const maxTranslateX = (viewWidth.value / 2) * scale.value - viewWidth.value / 2;
+ const minTranslateX = -maxTranslateX;
+ translationX.value = withDecay({
+ velocity: event.velocityX,
+ clamp: [minTranslateX, maxTranslateX]
+ });
+
+ const maxTranslateY = (viewHeight.value / 2) * scale.value - viewHeight.value / 2;
+ const minTranslateY = -maxTranslateY;
+ translationY.value = withDecay({
+ velocity: event.velocityY,
+ clamp: [minTranslateY, maxTranslateY]
+ });
});

const pinch = Gesture.Pinch()
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -8,14 +8,14 @@

Please **do not** create a pull request to update translation. tooot's translation is managed through [https://crowdin.tooot.app/](https://crowdin.tooot.app/) and Crowdin struggles to properly sync two ways. If there is a minor update and you do not want to register an account on Crowdin, please open an issue.


## Special thanks

- [@a_mento](https://crowdin.com/profile/a_mento) for Basques translation
- [@dzmitry.zubialevich](https://crowdin.com/profile/dzmitry.zubialevich) for Belarusian translation
- [@amrtf](https://crowdin.com/profile/amrtf) for Catalan and Spanish translation
- [@forenta](https://github.com/forenta) for German translation
- [@pat](https://piaille.fr/@pat) for French translation
- [@forenta](https://github.com/forenta) for German translation
- [@heracl.es](https://heracl.es/) for Greek translation
- [@andrigamerita](https://github.com/andrigamerita) for Italian translation
- [@Hikaru](https://github.com/Hikali-47041) and [@la_la](https://mstdn.jp/@la_la_la) for Japanese translation
- [@hellojaccc](https://github.com/hellojaccc) for Korean translation
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Expand Up @@ -13,7 +13,7 @@
<!-- [Custom] Expo Notifications -->
<meta-data android:name="expo.modules.notifications.default_notification_icon" android:resource="@drawable/ic_stat_notifications" />
<!-- [Custom] End Expo Notifications -->
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:exported="true" android:theme="@style/Theme.App.SplashScreen" android:screenOrientation="portrait" android:documentLaunchMode="never">
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:exported="true" android:theme="@style/Theme.App.SplashScreen" android:documentLaunchMode="never">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down
3 changes: 1 addition & 2 deletions fastlane/metadata/en-US/release_notes.txt
@@ -1,3 +1,2 @@
Enjoy toooting! This version includes following improvements and fixes:
- Added Basque language
- Added Polish language
- Added Greek translation
4 changes: 1 addition & 3 deletions fastlane/metadata/zh-Hans/release_notes.txt
@@ -1,4 +1,2 @@
toooting愉快!此版本包括以下改进和修复:
- 添加neodb.social书影音展示卡片
- 新增巴斯克语
- 新增波兰语
- 新增希腊语

0 comments on commit 7405718

Please sign in to comment.