forked from zulip/zulip-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: Upgrade react-native-simple-toast to 3.3.1, the latest
Unfortunately this causes a peer-dependency warning: warning " > react-native-simple-toast@3.3.1" has incorrect peer dependency "react-native@>=0.71.0". but no issues are observed in manual testing of this library's functionality on iOS or Android. While we're at it, use TsFlower for the types. The types tell us that `Toast.show`'s duration parameter is required; so, include it, even though the implementation has logic to fall back to Toast.SHORT if the argument isn't passed. This lets us pull in the latest version of the "Toast" pod for iOS; that's version 4.1.1. That version has a "privacy manifest" -- scalessec/Toast@401141d79 scalessec/Toast@607b12954 scalessec/Toast@85b492dd8 -- which should hopefully help us with zulip#5847. Granted, the Toast pod's privacy manifest file seems pretty boring; I think it just declares that the library doesn't access any sensitive data. Still, "Toast" is explicitly included in a list published by Apple of "commonly used SDKs" that require their own privacy manifest: https://developer.apple.com/support/third-party-SDK-requirements/ (In fact, I think it's the only one of zulip-mobile's dependencies that appears in that list.) Related: zulip#5847
- Loading branch information
1 parent
5fa3ce6
commit 70c7bb4
Showing
11 changed files
with
96 additions
and
51 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* @flow | ||
* @generated | ||
*/ | ||
export * from './lib/typescript/index.js.flow'; |
36 changes: 36 additions & 0 deletions
36
types/react-native-simple-toast/lib/typescript/NativeSimpleToast.js.flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* @flow | ||
* @generated by TsFlower | ||
*/ | ||
import type { ColorValue as $tsflower_subst$RN$ColorValue } from 'tsflower/subst/react-native'; | ||
import { type TurboModule } from 'react-native/Libraries/TurboModule/RCTExport'; | ||
|
||
export type StylesIOS = { | ||
textColor?: $tsflower_subst$RN$ColorValue, | ||
backgroundColor?: $tsflower_subst$RN$ColorValue, | ||
tapToDismissEnabled?: boolean, | ||
... | ||
}; | ||
|
||
export interface Spec extends TurboModule { | ||
getConstants: () => { | ||
SHORT: number, | ||
LONG: number, | ||
TOP: number, | ||
BOTTOM: number, | ||
CENTER: number, | ||
... | ||
}; | ||
show: (message: string, duration: number, options?: Object) => void; | ||
showWithGravity: (message: string, duration: number, gravity: number, options?: Object) => void; | ||
showWithGravityAndOffset: ( | ||
message: string, | ||
duration: number, | ||
gravity: number, | ||
xOffset: number, | ||
yOffset: number, | ||
options?: Object, | ||
) => void; | ||
} | ||
|
||
declare var _default: Spec; | ||
export default _default; |
25 changes: 25 additions & 0 deletions
25
types/react-native-simple-toast/lib/typescript/index.js.flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* @flow | ||
* @generated by TsFlower | ||
*/ | ||
import { type StylesIOS } from './NativeSimpleToast'; | ||
|
||
declare var _default: { | ||
SHORT: number, | ||
LONG: number, | ||
TOP: number, | ||
BOTTOM: number, | ||
CENTER: number, | ||
show(message: string, duration: number, options?: StylesIOS): void, | ||
showWithGravity(message: string, duration: number, gravity: number, options?: StylesIOS): void, | ||
showWithGravityAndOffset( | ||
message: string, | ||
duration: number, | ||
gravity: number, | ||
xOffset: number, | ||
yOffset: number, | ||
options?: StylesIOS, | ||
): void, | ||
... | ||
}; | ||
|
||
export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters