~xdavidwu/saf-sftp

54a867cda66884f88d9697d1c341d72c3b751600 — xdavidwu 2 years ago d663b18
SFTPDocumentsProvider: do not add port to title if canonical
1 files changed, 5 insertions(+), 1 deletions(-)

M src/main/java/org/safsftp/SFTPDocumentsProvider.java
M src/main/java/org/safsftp/SFTPDocumentsProvider.java => src/main/java/org/safsftp/SFTPDocumentsProvider.java +5 -1
@@ 243,11 243,15 @@ public class SFTPDocumentsProvider extends DocumentsProvider {
		port = settings.getString("port", "22");
		String mountpoint = settings.getString("mountpoint", ".");
		if (mountpoint.equals("")) mountpoint = ".";
		String title = "SFTP " + host;
		if (!port.equals("22")) {
			title += ":" + port;
		}
		MatrixCursor.RowBuilder row = result.newRow();
		row.add(Root.COLUMN_ROOT_ID, host + ":" + port);
		row.add(Root.COLUMN_DOCUMENT_ID, host + ":" + port + "/" + mountpoint);
		row.add(Root.COLUMN_FLAGS, 0);
		row.add(Root.COLUMN_TITLE, "SFTP " + host + ":" + port);
		row.add(Root.COLUMN_TITLE, title);
		row.add(Root.COLUMN_ICON, R.mipmap.sym_def_app_icon);
		row.add(Root.COLUMN_SUMMARY, "SFTP with user: " +
			settings.getString("username", ""));