Compare commits
2 Commits
6f11318e84
...
ed4f1d6f2c
Author | SHA1 | Date | |
---|---|---|---|
ed4f1d6f2c | |||
73f4a3407f |
@@ -1140,6 +1140,11 @@ releaseapkgo: out/TildeFriends-arm-release.apk ## Build, install, and run a rele
|
||||
@adb shell am start com.unprompted.tildefriends/.TildeFriendsActivity
|
||||
.PHONY: releaseapkgo
|
||||
|
||||
x86releaseapkgo: out/TildeFriends-x86-release.apk ## Build, install, and run an x86 release Android APK.
|
||||
@adb install -r $<
|
||||
@adb shell am start com.unprompted.tildefriends/.TildeFriendsActivity
|
||||
.PHONY: x86releaseapkgo
|
||||
|
||||
apklog: ## Display Android log output.
|
||||
@adb logcat *:S tildefriends
|
||||
.PHONY: apklog
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "🦀",
|
||||
"previous": "&3iV21tLQemlgG/Ui/WfYQyiprW/OBbFa8C3EKzPDt90=.sha256"
|
||||
"previous": "&TTGzyovmfKozjELCGPBFLLEXQcpfaArOMmqzemvz9J8=.sha256"
|
||||
}
|
||||
|
@@ -789,60 +789,45 @@ class TfMessageElement extends LitElement {
|
||||
</div>
|
||||
`);
|
||||
} else if (content.type == 'contact') {
|
||||
return this.render_frame(html`
|
||||
<div class="w3-bar">
|
||||
<div class="w3-bar-item">
|
||||
<tf-user id=${this.message.author} .users=${this.users}></tf-user>
|
||||
is
|
||||
${content.blocking === true
|
||||
? 'blocking'
|
||||
: content.blocking === false
|
||||
? 'no longer blocking'
|
||||
: content.following === true
|
||||
? 'following'
|
||||
: content.following === false
|
||||
? 'no longer following'
|
||||
: '?'}
|
||||
<tf-user
|
||||
id=${this.message.content.contact}
|
||||
.users=${this.users}
|
||||
></tf-user>
|
||||
</div>
|
||||
<div class="w3-bar-item w3-right">
|
||||
<button class="w3-button w3-theme-d1" @click=${this.toggle_menu}>
|
||||
%
|
||||
</button>
|
||||
<div
|
||||
class="w3-dropdown-content w3-bar-block w3-card-4 w3-theme-l1"
|
||||
style="right: 48px"
|
||||
>
|
||||
<a
|
||||
target="_top"
|
||||
class="w3-button w3-bar-item"
|
||||
href=${'#' + encodeURIComponent(this.message?.id)}
|
||||
>View Message</a
|
||||
>
|
||||
<button
|
||||
class="w3-button w3-bar-item w3-border-bottom"
|
||||
@click=${this.copy_id}
|
||||
>
|
||||
Copy ID
|
||||
</button>
|
||||
${this.drafts[this.message?.id] === undefined
|
||||
? html`
|
||||
<button
|
||||
class="w3-button w3-bar-item"
|
||||
@click=${this.show_reply}
|
||||
>
|
||||
↩️ Reply
|
||||
</button>
|
||||
`
|
||||
: undefined}
|
||||
switch (this.format) {
|
||||
case 'message':
|
||||
default:
|
||||
return this.render_frame(html`
|
||||
<div class="w3-bar">
|
||||
<div class="w3-bar-item">
|
||||
<tf-user
|
||||
id=${this.message.author}
|
||||
.users=${this.users}
|
||||
></tf-user>
|
||||
is
|
||||
${content.blocking === true
|
||||
? 'blocking'
|
||||
: content.blocking === false
|
||||
? 'no longer blocking'
|
||||
: content.following === true
|
||||
? 'following'
|
||||
: content.following === false
|
||||
? 'no longer following'
|
||||
: '?'}
|
||||
<tf-user
|
||||
id=${this.message.content.contact}
|
||||
.users=${this.users}
|
||||
></tf-user>
|
||||
</div>
|
||||
${this.render_menu()} ${this.render_votes()}
|
||||
${this.render_actions()}
|
||||
</div>
|
||||
`);
|
||||
break;
|
||||
case 'raw':
|
||||
return this.render_frame(html`
|
||||
${this.render_header()}
|
||||
<div class="w3-container">${this.render_raw()}</div>
|
||||
${this.render_votes()} ${this.render_actions()}
|
||||
</div>
|
||||
${this.render_votes()} ${this.render_actions()}
|
||||
</div>
|
||||
`);
|
||||
`);
|
||||
break;
|
||||
}
|
||||
} else if (content.type == 'post') {
|
||||
let self = this;
|
||||
let body;
|
||||
|
@@ -81,14 +81,14 @@ public class TildeFriendsActivity extends Activity {
|
||||
|
||||
TildeFriendsActivity activity = this;
|
||||
|
||||
Log.w("tildefriends", "Watching for changes in: " + getFilesDir().toString());
|
||||
observer = make_file_observer(getFilesDir().toString(), port_file_path);
|
||||
observer.startWatching();
|
||||
|
||||
set_status("Starting server...");
|
||||
server_thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Log.w("tildefriends", "Watching for changes in: " + getFilesDir().toString());
|
||||
observer = make_file_observer(getFilesDir().toString(), port_file_path);
|
||||
observer.startWatching();
|
||||
|
||||
Log.w("tildefriends", "Calling tf_server_main.");
|
||||
int result = tf_server_main(
|
||||
getFilesDir().toString(),
|
||||
@@ -445,6 +445,7 @@ public class TildeFriendsActivity extends Activity {
|
||||
hide_status();
|
||||
web_view.loadUrl(base_url + "login/auto");
|
||||
});
|
||||
observer.stopWatching();
|
||||
observer = null;
|
||||
} else {
|
||||
runOnUiThread(() -> {
|
||||
|
Reference in New Issue
Block a user