Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Fixes an edge case bug where auto-correction was not being disabled w…
Browse files Browse the repository at this point in the history
…hen autocompleting
  • Loading branch information
dzenbot committed Nov 18, 2014
1 parent 9ba3a7a commit 57ba72f
Show file tree
Hide file tree
Showing 15 changed files with 1,792 additions and 739 deletions.
4 changes: 3 additions & 1 deletion Examples/Messenger/Messenger-Shared/MessageViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ - (id)init
self = [super initWithTableViewStyle:UITableViewStylePlain];
if (self) {

self.users = @[@"Allen", @"Anna", @"Alicia", @"Arnold", @"Armando", @"Antonio", @"Brad", @"Catalaya", @"Christoph", @"Emerson", @"Eric", @"Everyone"];
self.users = @[@"Allen", @"Anna", @"Alicia", @"Arnold", @"Armando", @"Antonio", @"Brad", @"Catalaya", @"Christoph", @"Emerson", @"Eric", @"Everyone", @"Steve"];
self.channels = @[@"General", @"Random", @"iOS", @"Bugs", @"Sports", @"Android", @"UI", @"SSB"];
self.emojis = @[@"m", @"man", @"machine", @"block-a", @"block-b", @"bowtie", @"boar", @"boat", @"book", @"bookmark", @"neckbeard", @"metal", @"fu", @"feelsgood"];
}
Expand Down Expand Up @@ -269,6 +269,8 @@ - (BOOL)canPressRightButton

- (BOOL)canShowAutoCompletion
{
NSLog(@"%s",__FUNCTION__);

NSArray *array = nil;
NSString *prefix = self.foundPrefix;
NSString *word = self.foundWord;
Expand Down
10 changes: 4 additions & 6 deletions Examples/Messenger/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
PODS:
- LoremIpsum (1.0.0)
- SlackTextViewController (1.2.5):
- SlackTextViewController/Additions
- SlackTextViewController/Additions
- SlackTextViewController/Additions (1.2.5):
- SlackTextViewController (1.3.2):
- SlackTextViewController/Additions
- SlackTextViewController/Additions (1.3.2)

DEPENDENCIES:
- LoremIpsum (~> 1.0)
Expand All @@ -16,6 +14,6 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
LoremIpsum: a4d378ecaffcb08c7e40cdba3fb935dc41b2272c
SlackTextViewController: 75e8775b499c561ad728556bb57f369b04c30557
SlackTextViewController: c797abfa58b84aa01e5c2056a1e4f3611b76cd51

COCOAPODS: 0.34.1
COCOAPODS: 0.34.4

This file was deleted.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions Examples/Messenger/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2,460 changes: 1,759 additions & 701 deletions Examples/Messenger/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions SlackTextViewController.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ Pod::Spec.new do |s|
s.version = @version
s.summary = "A drop-in UIViewController subclass with a custom growing text input and other useful messaging features."
s.description = "Meant to be a replacement for UITableViewController & UICollectionViewController. This library is used in Slack's iOS app. It was built to fit our needs, but is flexible enough to be reused by others wanting to build great messaging apps for iOS."
s.homepage = "https://slack.com/"
s.screenshots = "https://github.com/slackhq/SlackTextViewController/raw/master/Screenshots/slacktextviewcontroller_demo.gif"
s.homepage = "https://slack.com/"
s.screenshots = "https://github.com/slackhq/SlackTextViewController/raw/master/Screenshots/slacktextviewcontroller_demo.gif"
s.license = { :type => 'Apache License, Version 2.0', :file => 'LICENSE' }
s.author = { "Slack Technologies, Inc." => "ios-team@slack-corp.com" }
s.source = { :git => "https://github.com/slackhq/SlackTextViewController.git", :tag => "v#{s.version}" }
s.source = { :git => "https://github.com/slackhq/SlackTextViewController.git", :tag => "v#{s.version}" }

s.platform = :ios, "7.0"
s.requires_arc = true

s.header_mappings_dir = 'Source'
s.source_files = "Classes", "Source/Classes/*.{h,m}"
s.frameworks = 'UIKit'
s.source_files = 'Classes', 'Source/Classes/*.{h,m}'

s.subspec 'Additions' do |add|
add.source_files = 'Source/Additions/*.{h,m}'
Expand Down
2 changes: 1 addition & 1 deletion Source/Classes/SLKTextViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ - (void)enableTypingSuggestionIfNeeded
BOOL enable = !self.isAutoCompleting;

// Skips if the QuickType Bar isn't visible and it's trying to disable it. And the inverted logic.
if (UI_IS_IOS8_AND_HIGHER && ((enable == NO && !self.isQuickTypeBarVisible) || (enable == YES && self.isQuickTypeBarVisible))) {
if (UI_IS_IOS8_AND_HIGHER && ((enable == NO && !self.isQuickTypeBarVisible) || (enable == self.textView.isTypingSuggestionEnabled))) {
return;
}

Expand Down

0 comments on commit 57ba72f

Please sign in to comment.