Skip to content

Commit

Permalink
💄 Gloss: Update Space/Line Breaks/Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Jan 6, 2023
1 parent 7f4a9c1 commit 49c07f9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
13 changes: 7 additions & 6 deletions ios/src_library/React Native/RNIModalView/RNIModalViewModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

@interface RCT_EXTERN_MODULE(RNIModalViewModule, RCTEventEmitter)

RCT_EXTERN_METHOD(dismissModalByID
: (NSString)modalID
callback: (RCTResponseSenderBlock)callback
// MARK: - Standalone Functions
// ----------------------------

RCT_EXTERN_METHOD(dismissModalByID: (NSString)modalID
callback: (RCTResponseSenderBlock)callback
);

RCT_EXTERN_METHOD(dismissAllModals
: (bool)animated
callback: (RCTResponseSenderBlock)callback
RCT_EXTERN_METHOD(dismissAllModals: (bool)animated
callback: (RCTResponseSenderBlock)callback
);

@end
23 changes: 15 additions & 8 deletions ios/src_library/React Native/RNIModalView/RNIModalViewModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,16 @@ class RNIModalViewModule: RCTEventEmitter {
};
};

// -----------------------------
// MARK: Extension: JS Functions
// -----------------------------
// MARK: - Standalone Functions
// ----------------------------

extension RNIModalViewModule {
@objc func dismissModalByID(_ modalID: NSString, callback: @escaping RCTResponseSenderBlock) {

// TODO: Re-write + Cleanup
@objc func dismissModalByID(
_ modalID: NSString,
callback: @escaping RCTResponseSenderBlock
) {
DispatchQueue.main.async {
guard let rootVC = UIWindow.key?.rootViewController else {
#if DEBUG
Expand Down Expand Up @@ -112,7 +116,10 @@ extension RNIModalViewModule {
};
};

@objc func dismissAllModals(_ animated: Bool, callback: @escaping RCTResponseSenderBlock){
@objc func dismissAllModals(
_ animated: Bool,
callback: @escaping RCTResponseSenderBlock
) {
DispatchQueue.main.async {
let success: Void? = UIWindow.key?
.rootViewController?
Expand All @@ -123,9 +130,9 @@ extension RNIModalViewModule {
};
};

// --------------------------
// MARK: Extension: JS Events
// --------------------------

// MARK: Extension - JS Events
// ---------------------------

extension RNIModalViewModule {
func sendModalEvent(event: Events, params: Dictionary<AnyHashable, Any>) {
Expand Down

0 comments on commit 49c07f9

Please sign in to comment.