-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Chore: Migrate Utils Folder to TS #3544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 19 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
b0b62af
Chore: Migrate Utils Folder to TS
reinaldonetof ee6be6c
avatar and twofactor
reinaldonetof 498f009
debounce
reinaldonetof c680806
deviceInfo and isValidEmail
reinaldonetof 2d25f76
events, fetch, goRoom, isReadOnly, layoutAnimation, media, messageTyp…
reinaldonetof 844427c
moment, openLink, random, review, room, server, theme, fix externalMo…
reinaldonetof 3296798
sslPinning, deleted info and throttle
reinaldonetof a343bc0
info.ts and tweaks
reinaldonetof 756a4e2
localAuthentication and his tweaks
reinaldonetof 0e6d162
shortnameToUnicode and base64 folders
reinaldonetof e35d883
log folder
reinaldonetof 67858df
fileUpload folder
reinaldonetof f8b992f
eslint disable at sendFileMessage
reinaldonetof ca64f94
fix log lint's errors
reinaldonetof ad92472
animation e conditional from navigation folder
reinaldonetof 905de04
make ts happy on actionsheet folder
reinaldonetof 6ddcc2f
Merge branch 'develop' into chore.ts-utils-folder
reinaldonetof 039a203
minor tweaks
reinaldonetof 690b500
minor tweak
reinaldonetof 29ad0cf
minor tweak
reinaldonetof 32f6498
tweaks
reinaldonetof af186df
minor tweaks
reinaldonetof f6efc61
minor tweak
reinaldonetof 49536cb
Event tweak
reinaldonetof 37c1bb0
Merge branch 'develop' into chore.ts-utils-folder
reinaldonetof b9c5447
minor tweak
AlexAlexandre de36f1e
change some interface's name
reinaldonetof e220512
theme preferences
reinaldonetof d68f55a
refactor tservermodel
reinaldonetof 5ef5ec1
Merge branch 'develop' into chore.ts-utils-folder
AlexAlexandre 234d154
refactor: update new types and interfaces for use ISubscription
AlexAlexandre 55a7498
Merge branch 'develop' into chore.ts-utils-folder
diegolmello File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| import React from 'react'; | ||
| import { TouchableOpacity } from 'react-native'; | ||
|
|
||
| import { isAndroid } from '../../utils/deviceInfo'; | ||
| import Touch from '../../utils/touch'; | ||
|
|
||
| // Taken from https://github.com/rgommezz/react-native-scroll-bottom-sheet#touchables | ||
| export const Button = isAndroid ? Touch : TouchableOpacity; | ||
| export const Button: typeof React.Component = isAndroid ? Touch : TouchableOpacity; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 @@ | ||
| export interface IThemePreference { | ||
| currentTheme: string; | ||
| darkLevel: string; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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,22 @@ | ||
| export default function debounce(func: Function, wait?: number, immediate?: boolean) { | ||
| let timeout: number | null; | ||
| function _debounce(...args: any[]) { | ||
| // @ts-ignore | ||
| // eslint-disable-next-line @typescript-eslint/no-this-alias | ||
| const context = this; | ||
| const later = function __debounce() { | ||
| timeout = null; | ||
| if (!immediate) { | ||
| func.apply(context, args); | ||
| } | ||
| }; | ||
| const callNow = immediate && !timeout; | ||
| clearTimeout(timeout!); | ||
| timeout = setTimeout(later, wait); | ||
| if (callNow) { | ||
| func.apply(context, args); | ||
| } | ||
| } | ||
| _debounce.stop = () => clearTimeout(timeout!); | ||
| return _debounce; | ||
| } |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.