-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27428 from software-mansion-labs/ts-migration/kow…
…czarz/app-state-monitor [No QA][TS migration] Migrate 'AppStateMonitor' lib to TypeScript
- Loading branch information
Showing
5 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
15 changes: 5 additions & 10 deletions
15
src/libs/AppStateMonitor/index.js → src/libs/AppStateMonitor/index.ts
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 was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
src/libs/AppStateMonitor/shouldReportActivity/index.native.ts
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,5 @@ | ||
import ShouldReportActivity from './types'; | ||
|
||
const shouldReportActivity: ShouldReportActivity = true; | ||
|
||
export default shouldReportActivity; |
6 changes: 5 additions & 1 deletion
6
...tateMonitor/shouldReportActivity/index.js → ...tateMonitor/shouldReportActivity/index.ts
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
import ShouldReportActivity from './types'; | ||
|
||
// We only need to report when the app becomes active on native since web maintains most of it's network functions while | ||
// in the "background" and the concept is not quite the same on mobile. We avoid setting this to true for web since | ||
// the event would fire much more frequently than it does on native causing performance issues. | ||
export default false; | ||
const shouldReportActivity: ShouldReportActivity = false; | ||
|
||
export default shouldReportActivity; |
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,3 @@ | ||
type ShouldReportActivity = boolean; | ||
|
||
export default ShouldReportActivity; |