Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Cocoapods and reduce Riot/OLM coupling #1220

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 9d16cdea9e05545d9a0362c174a348ff9d9450ef

COCOAPODS: 1.2.0
COCOAPODS: 1.2.1
2 changes: 1 addition & 1 deletion Riot.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2155,7 +2155,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
26 changes: 12 additions & 14 deletions Riot/ViewController/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@

#import "NBPhoneNumberUtil.h"

#import "OLMKit/OLMKit.h"

NSString* const kSettingsViewControllerPhoneBookCountryCellId = @"kSettingsViewControllerPhoneBookCountryCellId";

enum
Expand Down Expand Up @@ -71,7 +69,6 @@
enum
{
OTHER_VERSION_INDEX = 0,
OTHER_OLM_VERSION_INDEX,
OTHER_COPYRIGHT_INDEX,
OTHER_TERM_CONDITIONS_INDEX,
OTHER_PRIVACY_INDEX,
Expand All @@ -89,7 +86,8 @@
};

enum {
CRYPTOGRAPHY_INFO_INDEX = 0,
CRYPTOGRAPHY_OLM_VERSION_INDEX = 0,
CRYPTOGRAPHY_INFO_INDEX,
CRYPTOGRAPHY_BLACKLIST_UNVERIFIED_DEVICES_INDEX,
CRYPTOGRAPHY_EXPORT_INDEX,
CRYPTOGRAPHY_COUNT
Expand Down Expand Up @@ -1593,16 +1591,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N

cell = versionCell;
}
else if (row == OTHER_OLM_VERSION_INDEX)
{
MXKTableViewCell *versionCell = [self getDefaultTableViewCell:tableView];

versionCell.textLabel.text = [NSString stringWithFormat:NSLocalizedStringFromTable(@"settings_olm_version", @"Vector", nil), [OLMKit versionString]];

versionCell.selectionStyle = UITableViewCellSelectionStyleNone;

cell = versionCell;
}
else if (row == OTHER_TERM_CONDITIONS_INDEX)
{
MXKTableViewCell *termAndConditionCell = [self getDefaultTableViewCell:tableView];
Expand Down Expand Up @@ -1751,6 +1739,16 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N

cell = cryptoCell;
}
else if (row == CRYPTOGRAPHY_OLM_VERSION_INDEX)
{
MXKTableViewCell *versionCell = [self getDefaultTableViewCell:tableView];

versionCell.textLabel.text = [NSString stringWithFormat:NSLocalizedStringFromTable(@"settings_olm_version", @"Vector", nil), account.mxSession.crypto.olmVersion];

versionCell.selectionStyle = UITableViewCellSelectionStyleNone;

cell = versionCell;
}
else if (row == CRYPTOGRAPHY_BLACKLIST_UNVERIFIED_DEVICES_INDEX)
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
Expand Down