Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

Commit 09b5f71

Browse files
author
Benjamin Scholtysik (Reimold)
authored
Merge pull request #110 from bitstadium/release/4.1.4
Release/4.1.4
2 parents 1a5f91f + 872dd75 commit 09b5f71

10 files changed

+87
-465
lines changed

Classes/CrashReporting/BITCrashCXXExceptionHandler.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
@implementation BITCrashUncaughtCXXExceptionHandlerManager
2828

29-
extern "C" void LIBCXXABI_NORETURN __cxa_throw(void *exception_object, std::type_info *tinfo, void (*dest)(void *))
29+
extern "C" void __attribute__((noreturn)) __cxa_throw(void *exception_object, std::type_info *tinfo, void (*dest)(void *))
3030
{
3131
// Purposely do not take a lock in this function. The aim is to be as fast as
3232
// possible. While we could really use some of the info set up by the real
@@ -40,7 +40,7 @@ @implementation BITCrashUncaughtCXXExceptionHandlerManager
4040
// implementation changing in a future version. (Or not existing in an earlier
4141
// version).
4242

43-
typedef void (*cxa_throw_func)(void *, std::type_info *, void (*)(void *)) LIBCXXABI_NORETURN;
43+
typedef void (*cxa_throw_func)(void *, std::type_info *, void (*)(void *)) __attribute__((noreturn));
4444
static dispatch_once_t predicate = 0;
4545
static cxa_throw_func __original__cxa_throw = nullptr;
4646
static const void **__real_objc_ehtype_vtable = nullptr;

Classes/Feedback/BITFeedbackMessageCellView.m

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ - (void)updateAttachmentViews {
144144
_attachmentsAdded = 0;
145145

146146
NSArray *previewableAttachments = self.message.previewableAttachments;
147-
147+
[self clearAllImageViews];
148+
148149
if (_attachmentsAdded == [previewableAttachments count]) return;
149150

150151
if (previewableAttachments) {
@@ -211,6 +212,15 @@ - (void)drawRect:(NSRect)dirtyRect {
211212
[super drawRect:dirtyRect];
212213
}
213214

215+
- (void)clearAllImageViews{
216+
217+
// Since we simultaneously loop over and mutate the view's subviews array we need to go backwards
218+
for (NSView *subview in [self.subviews reverseObjectEnumerator]) {
219+
if ([subview isKindOfClass:[BITActivityIndicatorButton class]]) {
220+
[subview removeFromSuperview];
221+
}
222+
}
223+
}
214224

215225
+ (NSRect)messageUsedRect:(BITFeedbackMessage *)message tableViewWidth:(CGFloat)width {
216226
CGRect maxMessageHeightFrame = CGRectMake(0, 0, width - FRAME_SIDE_BORDER * 2 - 4, CGFLOAT_MAX);

Classes/Feedback/BITFeedbackWindowController.m

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ @interface BITFeedbackWindowController () <NSTableViewDataSource, NSTableViewDel
7070
@property (nonatomic, strong) BITFeedbackMessageAttachment *previewAttachment;
7171
@property (nonatomic) NSRect previewThumbnailRect;
7272

73-
@property (unsafe_unretained) IBOutlet NSArrayController *composeAttacchmentsArrayController;
73+
@property (unsafe_unretained) IBOutlet NSArrayController *composeAttachmentsArrayController;
7474

7575
- (BOOL)canContinueUserDataView;
7676
- (BOOL)canSendMessage;
@@ -140,7 +140,7 @@ - (void)windowDidLoad {
140140
name:BITHockeyFeedbackMessagesLoadingFinished
141141
object:nil];
142142

143-
[self.composeAttacchmentsArrayController setContent:self.attachments];
143+
[self.composeAttachmentsArrayController setContent:self.attachments];
144144
[self.feedbackAttachmentsTableView setTarget:self];
145145
[self.feedbackAttachmentsTableView setDoubleAction:@selector(previewAttachment:)];
146146
[self.feedbackAttachmentsTableView registerForDraggedTypes:[NSArray arrayWithObject:(NSString*)kUTTypeFileURL]];
@@ -208,7 +208,7 @@ - (void)deleteAttachment:(id)sender {
208208
NSInteger clickedRow = [self.feedbackAttachmentsTableView clickedRow];
209209

210210
[self.attachments removeObjectAtIndex:clickedRow];
211-
[self.composeAttacchmentsArrayController setContent:self.attachments];
211+
[self.composeAttachmentsArrayController setContent:self.attachments];
212212

213213
if ([self.attachments count] == 0) {
214214
[self hideComposeAttachments];
@@ -353,8 +353,10 @@ - (BOOL)canSendMessage {
353353
}
354354

355355
- (IBAction)sendMessage:(id)sender {
356-
[self.manager submitMessageWithText:[self.messageText string] andAttachments:self.attachments];
356+
[self.manager submitMessageWithText:[self.messageText string] andAttachments:[NSArray arrayWithArray:self.attachments]];
357357
self.messageText = nil;
358+
[self.attachments removeAllObjects];
359+
[self.composeAttachmentsArrayController setContent:self.attachments];
358360
[self reloadTableAndScrollToBottom];
359361
}
360362

@@ -494,7 +496,7 @@ - (void)addAttachmentWithFilename:(NSString *)filename {
494496
attachment.originalFilename = filename;
495497

496498
[self.attachments addObject:attachment];
497-
[self.composeAttacchmentsArrayController setContent:self.attachments];
499+
[self.composeAttachmentsArrayController setContent:self.attachments];
498500
[self.feedbackAttachmentsTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:[self.attachments count] - 1] byExtendingSelection:NO];
499501
[self.feedbackAttachmentsTableView scrollRowToVisible:[self.attachments count] - 1];
500502

Classes/Feedback/BITFeedbackWindowController.xib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<objects>
88
<customObject id="-2" userLabel="File's Owner" customClass="BITFeedbackWindowController">
99
<connections>
10-
<outlet property="composeAttacchmentsArrayController" destination="qlE-az-7zs" id="eHb-7l-lvM"/>
10+
<outlet property="composeAttachmentsArrayController" destination="qlE-az-7zs" id="eHb-7l-lvM"/>
1111
<outlet property="contactInfoTextField" destination="77" id="KCn-wy-JQO"/>
1212
<outlet property="feedbackAttachmentsScrollView" destination="7No-Zb-2jx" id="J4I-jl-EDL"/>
1313
<outlet property="feedbackAttachmentsTableView" destination="vi6-mo-5xv" id="biG-nM-sgF"/>

HockeySDK-Mac.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'HockeySDK-Mac'
3-
s.version = '4.1.3'
3+
s.version = '4.1.4'
44

55
s.summary = 'Collect live crash reports, get feedback from your users, distribute your betas, and get usage data.'
66
s.description = <<-DESC

0 commit comments

Comments
 (0)