14
14
// limitations under the License.
15
15
//
16
16
17
+ #if SWIFT_PACKAGE
18
+ #import " ARKLogMessage.h"
19
+ #else
17
20
#import < CoreAardvark/ARKLogMessage.h>
21
+ #endif
18
22
19
23
#import " AardvarkDefines.h"
20
24
@@ -46,14 +50,14 @@ - (instancetype)initWithText:(NSString *)text image:(UIImage *)image type:(ARKLo
46
50
- (instancetype )initWithText : (NSString *)text image : (UIImage *)image type : (ARKLogType)type parameters : (NSDictionary *)parameters userInfo : (NSDictionary *)userInfo date : (nonnull NSDate *)date ;
47
51
{
48
52
self = [super init ];
49
-
53
+
50
54
_text = [text copy ];
51
55
_image = image;
52
56
_type = type;
53
57
_parameters = [parameters copy ] ?: @{};
54
58
_userInfo = [userInfo copy ] ?: @{};
55
59
_date = date;
56
-
60
+
57
61
return self;
58
62
}
59
63
@@ -69,7 +73,7 @@ - (instancetype)initWithCoder:(NSCoder *)aDecoder;
69
73
NSDate *const date = [([aDecoder decodeObjectOfClass: [NSDate class ] forKey: ARKSelfKeyPath (date)] ?: [aDecoder decodeObjectOfClass: [NSDate class ] forKey: ARKSelfKeyPath (creationDate)]) copy ];
70
74
#pragma clang diagnostic pop
71
75
NSDictionary <NSString *, NSString *> *const parameters = [aDecoder decodeObjectOfClass: [NSDictionary class ] forKey: ARKSelfKeyPath (parameters)];
72
-
76
+
73
77
return [self initWithText: text image: image type: type parameters: parameters userInfo: nil date: date];
74
78
}
75
79
@@ -97,16 +101,16 @@ - (BOOL)isEqual:(id)object;
97
101
if (![self isMemberOfClass: [object class ]]) {
98
102
return NO ;
99
103
}
100
-
104
+
101
105
ARKLogMessage *otherMessage = (ARKLogMessage *)object;
102
106
if (!(self.text == otherMessage.text || [self .text isEqualToString: otherMessage.text])) {
103
107
return NO ;
104
108
}
105
-
109
+
106
110
if (!(self.image == otherMessage.image || [self .image isEqual: otherMessage.image])) {
107
111
return NO ;
108
112
}
109
-
113
+
110
114
if (self.type != otherMessage.type ) {
111
115
return NO ;
112
116
}
@@ -118,7 +122,7 @@ - (BOOL)isEqual:(id)object;
118
122
if (![self .parameters isEqualToDictionary: otherMessage.parameters]) {
119
123
return NO ;
120
124
}
121
-
125
+
122
126
return YES ;
123
127
}
124
128
0 commit comments