diff --git a/app/components/autocomplete/slash_suggestion/app_command_parser/app_command_parser.ts b/app/components/autocomplete/slash_suggestion/app_command_parser/app_command_parser.ts index df080fbd04..899d760946 100644 --- a/app/components/autocomplete/slash_suggestion/app_command_parser/app_command_parser.ts +++ b/app/components/autocomplete/slash_suggestion/app_command_parser/app_command_parser.ts @@ -546,7 +546,7 @@ export class ParsedCommand { this.incomplete += c; this.i++; if (escaped) { - //TODO: handle \n, \t, other escaped chars + //TODO: handle \n, \t, other escaped chars https://mattermost.atlassian.net/browse/MM-43476 escaped = false; } break; @@ -735,7 +735,7 @@ export class ParsedCommand { this.incomplete += c; this.i++; if (escaped) { - //TODO: handle \n, \t, other escaped chars + //TODO: handle \n, \t, other escaped chars https://mattermost.atlassian.net/browse/MM-43476 escaped = false; } break; @@ -1079,7 +1079,7 @@ export class AppCommandParser { } // Add "Execute Current Command" suggestion - // TODO get full text from SuggestionBox + // TODO get full text from SuggestionBox https://mattermost.atlassian.net/browse/MM-43477 const executableStates: string[] = [ ParseState.EndCommand, ParseState.CommandSeparator, diff --git a/app/components/autocomplete/slash_suggestion/slash_suggestion.tsx b/app/components/autocomplete/slash_suggestion/slash_suggestion.tsx index af152fe58a..486c6efdc8 100644 --- a/app/components/autocomplete/slash_suggestion/slash_suggestion.tsx +++ b/app/components/autocomplete/slash_suggestion/slash_suggestion.tsx @@ -19,7 +19,7 @@ import IntegrationsManager from '@managers/integrations_manager'; import {AppCommandParser} from './app_command_parser/app_command_parser'; import SlashSuggestionItem from './slash_suggestion_item'; -// TODO: Remove when all below commands have been implemented +// TODO: Remove when all below commands have been implemented https://mattermost.atlassian.net/browse/MM-43478 const COMMANDS_TO_IMPLEMENT_LATER = ['collapse', 'expand', 'logout']; const NON_MOBILE_COMMANDS = ['shortcuts', 'search', 'settings']; diff --git a/app/database/models/app/global.ts b/app/database/models/app/global.ts index f8942dfdee..de2a14d72e 100644 --- a/app/database/models/app/global.ts +++ b/app/database/models/app/global.ts @@ -11,8 +11,6 @@ import type GlobalModelInterface from '@typings/database/models/app/global'; const {GLOBAL} = MM_TABLES.APP; -// TODO : add TS definitions to sanitizer function signature. - /** * The Global model will act as a dictionary of name-value pairs. The value field can be a JSON object or any other * data type. It will hold information that applies to the whole app ( e.g. sidebar settings for tablets) diff --git a/app/init/credentials.ts b/app/init/credentials.ts index 01231d4688..244e7e9b5f 100644 --- a/app/init/credentials.ts +++ b/app/init/credentials.ts @@ -94,7 +94,7 @@ export const getServerCredentials = async (serverUrl: string): Promise { - // TODO: Replace this function with an utility function based on previous code - return roles === 'system_admin'; -}; +import {isSystemAdmin} from '@utils/user'; const clientMap: Record = {}; diff --git a/app/products/calls/screens/call_screen/index.ts b/app/products/calls/screens/call_screen/index.ts index ed6845fd29..aa59e70a43 100644 --- a/app/products/calls/screens/call_screen/index.ts +++ b/app/products/calls/screens/call_screen/index.ts @@ -21,7 +21,7 @@ const enhanced = withObservables([], () => { switchMap((url) => of$(DatabaseManager.serverDatabases[url]?.database)), ); - // TODO: to be optimized + // TODO: to be optimized https://mattermost.atlassian.net/browse/MM-49338 const participantsDict = combineLatest([database, currentCall]).pipe( switchMap(([db, call]) => (db && call ? queryUsersById(db, Object.keys(call.participants)).observeWithColumns(['nickname', 'username', 'first_name', 'last_name', 'last_picture_update']) : of$([])).pipe( // eslint-disable-next-line max-nested-callbacks diff --git a/app/screens/integration_selector/selected_options/index.tsx b/app/screens/integration_selector/selected_options/index.tsx index 2ed6d3cab6..af3217f71e 100644 --- a/app/screens/integration_selector/selected_options/index.tsx +++ b/app/screens/integration_selector/selected_options/index.tsx @@ -61,9 +61,6 @@ const SelectedOptions = ({ />); }); - // eslint-disable-next-line no-warning-comments - // TODO Consider using a Virtualized List since the number of elements is potentially unbounded. - // https://mattermost.atlassian.net/browse/MM-48420 return ( String { - do { - return try getOnlyServerUrl() - } catch { - print(error) - return "" - } - } - - public func getOnlyServerUrl() throws -> String { - if sqlite3_open(DEFAULT_DB_PATH, &defaultDB) != SQLITE_OK { - throw DatabaseError.OpenFailure(DEFAULT_DB_PATH) - } - - defer { - sqlite3_finalize(queryStatement) - sqlite3_close(defaultDB) - } - - var queryStatement: OpaquePointer? - let queryString = "SELECT url FROM Servers;" - if sqlite3_prepare_v2(defaultDB, queryString, -1, &queryStatement, nil) == SQLITE_OK { - if sqlite3_step(queryStatement) == SQLITE_ROW, - let result = sqlite3_column_text(queryStatement, 0) { - return String(cString: result) - } - - if sqlite3_step(queryStatement) == SQLITE_ROW { - // Throw since we have more than one row in the `servers` table - throw DatabaseError.MultipleServers - } - } - - throw DatabaseError.NoResults(queryString) - } -} diff --git a/ios/Gekidou/Sources/Gekidou/Storage/Database.swift b/ios/Gekidou/Sources/Gekidou/Storage/Database.swift index 66abc5c9ae..d4802bbd97 100644 --- a/ios/Gekidou/Sources/Gekidou/Storage/Database.swift +++ b/ios/Gekidou/Sources/Gekidou/Storage/Database.swift @@ -9,8 +9,6 @@ import Foundation import SQLite3 import SQLite -// TODO: This should be exposed to Objective-C in order to handle -// any Database throwable methods. enum DatabaseError: Error { case OpenFailure(_ dbPath: String) case MultipleServers