Skip to content

Commit

Permalink
fix:bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fanyuecheng committed Jun 22, 2021
1 parent bd33878 commit ab4a33f
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 577 deletions.
18 changes: 2 additions & 16 deletions Pica.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
33AB8276267B377300A2FD3F /* PCVoiceMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 33AB8275267B377300A2FD3F /* PCVoiceMessageCell.m */; };
33AB827A267C3BFC00A2FD3F /* PCMessageNotificationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 33AB8279267C3BFC00A2FD3F /* PCMessageNotificationView.m */; };
33AB827F267C4A9600A2FD3F /* PCRecordView.m in Sources */ = {isa = PBXBuildFile; fileRef = 33AB827E267C4A9600A2FD3F /* PCRecordView.m */; };
33AB8283267C4D5900A2FD3F /* PCChatInputBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 33AB8282267C4D5900A2FD3F /* PCChatInputBar.m */; };
33AB8286267C4F9B00A2FD3F /* image.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33AB8285267C4F9B00A2FD3F /* image.xcassets */; };
33AD93C7255017160079DFAE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 33AD93C6255017160079DFAE /* AppDelegate.m */; };
33AD93CD255017160079DFAE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 33AD93CC255017160079DFAE /* ViewController.m */; };
Expand Down Expand Up @@ -254,8 +253,6 @@
33AB8279267C3BFC00A2FD3F /* PCMessageNotificationView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PCMessageNotificationView.m; sourceTree = "<group>"; };
33AB827D267C4A9600A2FD3F /* PCRecordView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PCRecordView.h; sourceTree = "<group>"; };
33AB827E267C4A9600A2FD3F /* PCRecordView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PCRecordView.m; sourceTree = "<group>"; };
33AB8281267C4D5900A2FD3F /* PCChatInputBar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PCChatInputBar.h; sourceTree = "<group>"; };
33AB8282267C4D5900A2FD3F /* PCChatInputBar.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PCChatInputBar.m; sourceTree = "<group>"; };
33AB8285267C4F9B00A2FD3F /* image.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = image.xcassets; sourceTree = "<group>"; };
33AD93C2255017160079DFAE /* Pica.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Pica.app; sourceTree = BUILT_PRODUCTS_DIR; };
33AD93C5255017160079DFAE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -466,7 +463,6 @@
337AD6A62673710B009EA2D1 /* Chat */ = {
isa = PBXGroup;
children = (
33AB8280267C4D4400A2FD3F /* Input */,
337AD6B526784BBC009EA2D1 /* View */,
337AD6B426784BB5009EA2D1 /* Controller */,
337AD6AB26737246009EA2D1 /* Model */,
Expand Down Expand Up @@ -531,15 +527,6 @@
path = View;
sourceTree = "<group>";
};
33AB8280267C4D4400A2FD3F /* Input */ = {
isa = PBXGroup;
children = (
33AB8281267C4D5900A2FD3F /* PCChatInputBar.h */,
33AB8282267C4D5900A2FD3F /* PCChatInputBar.m */,
);
path = Input;
sourceTree = "<group>";
};
33AB8284267C4F8700A2FD3F /* image */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1010,7 +997,6 @@
3358C8B4265F79AF0000D17F /* PCProfileHeaderView.m in Sources */,
337AD6B826784BD3009EA2D1 /* PCChatListController.m in Sources */,
334EADD9255A88EB00B0231C /* PCComicsEpisodeView.m in Sources */,
33AB8283267C4D5900A2FD3F /* PCChatInputBar.m in Sources */,
334EAD6B25593E7900B0231C /* PCTableViewCell.m in Sources */,
33AB827A267C3BFC00A2FD3F /* PCMessageNotificationView.m in Sources */,
33AD93CD255017160079DFAE /* ViewController.m in Sources */,
Expand Down Expand Up @@ -1200,7 +1186,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.0.8;
MARKETING_VERSION = 0.0.9;
PRODUCT_BUNDLE_IDENTIFIER = com.pica.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
Expand All @@ -1221,7 +1207,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.0.8;
MARKETING_VERSION = 0.0.9;
PRODUCT_BUNDLE_IDENTIFIER = com.pica.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
Expand Down
6 changes: 4 additions & 2 deletions Pica/Chat/Controller/PCChatViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ - (void)hideKeyboardWithUserInfo:(QMUIKeyboardUserInfo *)info {
}
}

- (void)insertMessage:(PCChatMessage *)message scrollToBottom:(BOOL)scroll {
- (void) insertMessage:(PCChatMessage *)message scrollToBottom:(BOOL)scroll {
[self.messageArray addObject:message];
[self.tableView reloadData];

Expand Down Expand Up @@ -560,6 +560,8 @@ - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range r
// 监听 @ 字符的输入
else if ([text isEqualToString:@"@"]) {

} else if ([text isEqualToString:@"\n"]) {
return NO;
}
return YES;
}
Expand Down Expand Up @@ -591,7 +593,7 @@ - (PCChatManager *)manager {
if (message) {
if (message.messageType == PCChatMessageTypeDefault || message.messageType == PCChatMessageTypeImage ||
message.messageType == PCChatMessageTypeAudio) {
[self insertMessage:message scrollToBottom:NO];
[self insertMessage:message scrollToBottom:YES];
} else if (message.messageType == PCChatMessageTypeConnectionCount) {
self.navigationItem.rightBarButtonItem = [UIBarButtonItem qmui_itemWithTitle:[NSString stringWithFormat:@"在线人数:%@", @(message.connections)] target:nil action:NULL];
self.navigationItem.rightBarButtonItem.enabled = NO;
Expand Down
44 changes: 0 additions & 44 deletions Pica/Chat/Input/PCChatInputBar.h

This file was deleted.

Loading

0 comments on commit ab4a33f

Please sign in to comment.