mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-01 05:36:57 +02:00
Room search: search result should include the search pattern when it corresponds to a valid room alias or id.
+ Room search: Room preview should be used when user selects a public room that he did not join yet. https://github.com/vector-im/vector-ios/issues/328 https://github.com/vector-im/vector-ios/issues/329
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
|
||||
#import "InviteRecentTableViewCell.h"
|
||||
#import "DirectoryRecentTableViewCell.h"
|
||||
#import "RoomIdOrAliasTableViewCell.h"
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@@ -630,6 +631,18 @@
|
||||
// Show the directory screen
|
||||
[homeViewController showPublicRoomsDirectory];
|
||||
}
|
||||
else if ([cell isKindOfClass:[RoomIdOrAliasTableViewCell class]])
|
||||
{
|
||||
NSString *roomIdOrAlias = ((RoomIdOrAliasTableViewCell*)cell).titleLabel.text;
|
||||
|
||||
if (roomIdOrAlias.length)
|
||||
{
|
||||
// Open the room or preview it
|
||||
NSString *fragment = [NSString stringWithFormat:@"/room/%@", [roomIdOrAlias stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
|
||||
[[AppDelegate theDelegate] handleUniversalLinkFragment:fragment];
|
||||
}
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
|
||||
|
||||
Reference in New Issue
Block a user