-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Apply layout.backgroundColor on parent view controllers * Add layout.componentBackgroundColor * Remove drawBehind deprecation
- Loading branch information
Showing
14 changed files
with
95 additions
and
66 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -2,6 +2,4 @@ | |
|
||
@interface DeprecationOptions : RNNOptions | ||
|
||
@property (nonatomic, strong) Bool* deprecateDrawBehind; | ||
|
||
@end |
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
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,26 +1,10 @@ | ||
import isEqual from 'lodash/isEqual'; | ||
import once from 'lodash/once'; | ||
import { Platform } from 'react-native'; | ||
|
||
export class Deprecations { | ||
private deprecateDrawBehind = once((parentOptions: object) => { | ||
this.warnDeprecatedOption('drawBehind', 'Please use SafeAreaView, or ScrollView and set drawBehind true in default options. For more information see https://github.com/wix/react-native-navigation/issues/5913', parentOptions); | ||
}); | ||
public onProcessOptions(_key: string, _parentOptions: Record<string, any>) { | ||
|
||
public onProcessOptions(key: string, parentOptions: Record<string, any>) { | ||
if (isEqual(key, 'drawBehind') && Platform.OS === 'ios') { | ||
this.deprecateDrawBehind(parentOptions); | ||
} | ||
} | ||
|
||
public onProcessDefaultOptions(key: string, parentOptions: Record<string, any>) { | ||
if (isEqual(key, 'drawBehind') && Platform.OS === 'ios' && parentOptions[key] === false) { | ||
this.deprecateDrawBehind(parentOptions); | ||
} | ||
} | ||
public onProcessDefaultOptions(_key: string, _parentOptions: Record<string, any>) { | ||
|
||
private warnDeprecatedOption(key: string, message: string, parentOptions: object) { | ||
// tslint:disable-next-line:no-console | ||
console.warn(`${key} is deprecated. ${message}`, parentOptions); | ||
} | ||
} |
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