@@ -124,9 +124,7 @@ -(void)setupUploadManager{
124
124
- (void )initCIProcess : (NSNotification *)notification {
125
125
if ([notification.object isKindOfClass: [XCProject class ]]) {
126
126
self.ciRepoProject = notification.object ;
127
- if (self.ciRepoProject .ipaFullPath ) {
128
- [self initIPAUploadProcessForURL: self .ciRepoProject.ipaFullPath];
129
- }
127
+ [self initIPAUploadProcessForCIProject: self .ciRepoProject];
130
128
}
131
129
}
132
130
@@ -165,13 +163,22 @@ - (IBAction)selectedFilePathHandler:(NSPathControl *)sender {
165
163
}
166
164
}
167
165
168
- - (void )initIPAUploadProcessForURL : (NSURL *)ipaURL {
166
+ - (void )initIPAUploadProcessForCIProject : (XCProject *)ciProject {
167
+ NSURL *ipaURL = ciProject.ipaFullPath ;
168
+ if (ipaURL == nil ) {
169
+ return ;
170
+ }
171
+
169
172
[self viewStateForProgressFinish: YES ];
170
173
[self .project setIpaFullPath: ipaURL];
171
174
[selectedFilePath setURL: ipaURL];
172
- [textFieldEmail setStringValue: self .project.emails];
173
- [textFieldMessage setStringValue: self .project.personalMessage];
174
- [buttonUniqueLink setState: self .project.keepSameLink.boolValue ? NSOnState : NSOffState ];
175
+ if (ciProject.emails .length != 0 ) {
176
+ [textFieldEmail setStringValue: ciProject.emails];
177
+ }
178
+ if (ciProject.personalMessage .length != 0 ) {
179
+ [textFieldMessage setStringValue: ciProject.personalMessage];
180
+ }
181
+ [buttonUniqueLink setState: ciProject.keepSameLink.boolValue ? NSOnState : NSOffState ];
175
182
[self actionButtonTapped: buttonAction];
176
183
}
177
184
0 commit comments