diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0ff0b7c..5119886 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+## v0.5.3 ##
+* Implementation of new events API (incl. sync and notification) for Friendica version >= 20.03
+* Indentation to see replied to newsitem for conversation view
+* News view type config moved from account page to config page
+* Simplification of account page on first start
+* Bugfixes
+
+
## v0.5.2 ##
* Redesign of news item
* Background sync for Android >8.0
diff --git a/README.md b/README.md
index a191116..0fef74b 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,7 @@ Currently supported:
* Android notifications or Dbus notification (Linux) for new items in friends timeline, replies and DMs
* Search for news
* Click on hashtag in newsitem starts search for news with that word
-* Click on image shows image fullscree
+* Click on image shows image fullscreen
* Click on video or youtube video shows video fullscreen
* For news containing urls ending with mp3, mp4, avi, webm, ogg or to a Peertube instance: media can be played in the app
* Open links in external browser
@@ -81,13 +81,12 @@ ToDo:
# Events #
Currently supported:
-* Download own public events
-* Show public of Friendica contacts
+* Show own events
+* Show public events of Friendica contacts
* List view of events of selected date
* Click on event to show details
ToDo
-* Show own private events (needs API)
* Create events (needs API)
@@ -97,6 +96,7 @@ Currently supported:
* View mode for news (tree or timeline)
* Maximum news (deleted after use of Quit button)
* Sync home timeline, replies, DM, Notify yes/no
+* Hide #nsfw
ToDo
* OAuth?
diff --git a/source-android/android/AndroidManifest.xml b/source-android/android/AndroidManifest.xml
index 3fa9bf8..22426df 100644
--- a/source-android/android/AndroidManifest.xml
+++ b/source-android/android/AndroidManifest.xml
@@ -1,7 +1,19 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -17,6 +29,10 @@
+
+
+
+
@@ -24,22 +40,33 @@
-
-
+
-
+
+
+
+
-
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -64,12 +105,14 @@
+
+
@@ -83,20 +126,7 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/source-android/android/arm/libcrypto_1_1.so b/source-android/android/arm/libcrypto_1_1.so
new file mode 100755
index 0000000..07ec588
Binary files /dev/null and b/source-android/android/arm/libcrypto_1_1.so differ
diff --git a/source-android/android/arm/libssl_1_1.so b/source-android/android/arm/libssl_1_1.so
new file mode 100755
index 0000000..5aac52f
Binary files /dev/null and b/source-android/android/arm/libssl_1_1.so differ
diff --git a/source-android/android/arm64/libcrypto_1_1.so b/source-android/android/arm64/libcrypto_1_1.so
new file mode 100755
index 0000000..43653f8
Binary files /dev/null and b/source-android/android/arm64/libcrypto_1_1.so differ
diff --git a/source-android/android/arm64/libssl_1_1.so b/source-android/android/arm64/libssl_1_1.so
new file mode 100755
index 0000000..5590c78
Binary files /dev/null and b/source-android/android/arm64/libssl_1_1.so differ
diff --git a/source-android/android/build.gradle b/source-android/android/build.gradle
index 73677ef..9f47fcd 100644
--- a/source-android/android/build.gradle
+++ b/source-android/android/build.gradle
@@ -4,37 +4,26 @@ buildscript {
jcenter()
mavenCentral()
}
+
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
}
}
-allprojects {
- repositories {
- google()
- jcenter()
+repositories {
+ google()
+ jcenter()
maven {
url "https://maven.google.com"
}
- }
}
apply plugin: 'com.android.application'
dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
}
-//apply plugin: 'android-library'
-
-//dependencies {
-// compile 'com.android.support:support-v4:25.4.0'
-//}
-
-//dependencies {
-// compile 'com.android.support:support-compat:25.4.0'
-//}
-
dependencies {
compile 'androidx.appcompat:appcompat:1.1.0'
}
@@ -55,7 +44,7 @@ android {
compileSdkVersion androidCompileSdkVersion.toInteger()
- buildToolsVersion androidBuildToolsVersion
+ buildToolsVersion '28.0.3'
sourceSets {
main {
@@ -63,7 +52,7 @@ android {
java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
res.srcDirs = [qt5AndroidDir + '/res', 'res']
- resources.srcDirs = ['src']
+ resources.srcDirs = ['resources']
renderscript.srcDirs = ['src']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
@@ -73,6 +62,15 @@ android {
lintOptions {
abortOnError false
}
+
+ // Do not compress Qt binary resources file
+ aaptOptions {
+ noCompress 'rcc'
+ }
+
+ defaultConfig {
+ resConfigs "en"
+ }
}
apply from: "androidnative.gradle"
setAndroidNativePath("/../androidnative.pri");
diff --git a/source-android/android/build.gradle.backup b/source-android/android/build.gradle.backup
deleted file mode 100644
index f4f2592..0000000
--- a/source-android/android/build.gradle.backup
+++ /dev/null
@@ -1,69 +0,0 @@
-buildscript {
- repositories {
- jcenter()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:1.1.0'
- }
-}
-
-allprojects {
- repositories {
- jcenter()
- }
-}
-
-apply plugin: 'com.android.application'
-
-dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
-}
-
-//apply plugin: 'android-library'
-
-dependencies {
- compile 'com.android.support:support-v4:25.3.1'
-}
-
-dependencies {
- compile 'com.android.support:support-compat:25.3.1'
-}
-
-android {
- /*******************************************************
- * The following variables:
- * - androidBuildToolsVersion,
- * - androidCompileSdkVersion
- * - qt5AndroidDir - holds the path to qt android files
- * needed to build any Qt application
- * on Android.
- *
- * are defined in gradle.properties file. This file is
- * updated by QtCreator and androiddeployqt tools.
- * Changing them manually might break the compilation!
- *******************************************************/
-
- compileSdkVersion androidCompileSdkVersion.toInteger()
-
- buildToolsVersion androidBuildToolsVersion
-
- sourceSets {
- main {
- manifest.srcFile 'AndroidManifest.xml'
- java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
- aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
- res.srcDirs = [qt5AndroidDir + '/res', 'res']
- resources.srcDirs = ['src']
- renderscript.srcDirs = ['src']
- assets.srcDirs = ['assets']
- jniLibs.srcDirs = ['libs']
- }
- }
-
- lintOptions {
- abortOnError false
- }
-}
- apply from: "androidnative.gradle"
- setAndroidNativePath("/../androidnative.pri");
diff --git a/source-android/android/gradle/wrapper/gradle-wrapper.jar b/source-android/android/gradle/wrapper/gradle-wrapper.jar
index 8c0fb64..f6b961f 100644
Binary files a/source-android/android/gradle/wrapper/gradle-wrapper.jar and b/source-android/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/source-android/android/gradle/wrapper/gradle-wrapper.properties b/source-android/android/gradle/wrapper/gradle-wrapper.properties
index 5660985..4b7e1f3 100644
--- a/source-android/android/gradle/wrapper/gradle-wrapper.properties
+++ b/source-android/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
diff --git a/source-android/android/gradlew b/source-android/android/gradlew
index 91a7e26..cccdd3d 100755
--- a/source-android/android/gradlew
+++ b/source-android/android/gradlew
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
##############################################################################
##
@@ -6,47 +6,6 @@
##
##############################################################################
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
- echo "$*"
-}
-
-die ( ) {
- echo
- echo "$*"
- echo
- exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
- [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
@@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do
fi
done
SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >&-
+cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
-cd "$SAVED" >&-
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -90,7 +89,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -114,6 +113,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
@@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+APP_ARGS=$(save "$@")
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/source-android/android/gradlew.bat b/source-android/android/gradlew.bat
index aec9973..f955316 100644
--- a/source-android/android/gradlew.bat
+++ b/source-android/android/gradlew.bat
@@ -1,90 +1,84 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/source-android/android/libcrypto.so b/source-android/android/libcrypto.so
deleted file mode 100644
index 54e1a05..0000000
Binary files a/source-android/android/libcrypto.so and /dev/null differ
diff --git a/source-android/android/libcrypto_1_1.so b/source-android/android/libcrypto_1_1.so
deleted file mode 100755
index 8ddd6e3..0000000
Binary files a/source-android/android/libcrypto_1_1.so and /dev/null differ
diff --git a/source-android/android/libssl.so b/source-android/android/libssl.so
deleted file mode 100644
index 4ffd83f..0000000
Binary files a/source-android/android/libssl.so and /dev/null differ
diff --git a/source-android/android/libssl_1_1.so b/source-android/android/libssl_1_1.so
deleted file mode 100755
index dc484b4..0000000
Binary files a/source-android/android/libssl_1_1.so and /dev/null differ
diff --git a/source-android/android/local.properties b/source-android/android/local.properties
deleted file mode 100644
index ada6c98..0000000
--- a/source-android/android/local.properties
+++ /dev/null
@@ -1 +0,0 @@
-sdk.dir=/home/pankraz/android-sdk_alt
diff --git a/source-android/android/res/drawable-hdpi/icon.png b/source-android/android/res/drawable-hdpi/icon.png
new file mode 100644
index 0000000..7618b3a
Binary files /dev/null and b/source-android/android/res/drawable-hdpi/icon.png differ
diff --git a/source-android/android/res/drawable-ldpi/icon.png b/source-android/android/res/drawable-ldpi/icon.png
new file mode 100644
index 0000000..8e269d7
Binary files /dev/null and b/source-android/android/res/drawable-ldpi/icon.png differ
diff --git a/source-android/android/res/drawable-mdpi/icon.png b/source-android/android/res/drawable-mdpi/icon.png
new file mode 100644
index 0000000..6643513
Binary files /dev/null and b/source-android/android/res/drawable-mdpi/icon.png differ
diff --git a/source-android/android/res/values/libs.xml b/source-android/android/res/values/libs.xml
index 77f422c..6b1a4a2 100644
--- a/source-android/android/res/values/libs.xml
+++ b/source-android/android/res/values/libs.xml
@@ -1,7 +1,7 @@
- https://download.qt.io/ministro/android/qt5/qt-5.8
+ https://download.qt.io/ministro/android/qt5/qt-5.14
-
-
-
-
-
-
+
+
-
-
+
+
+
diff --git a/source-android/android/src/ExampleService.java b/source-android/android/src/ExampleService.java
deleted file mode 100644
index 217e99c..0000000
--- a/source-android/android/src/ExampleService.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package androidnative.example;
-import androidnative.SystemDispatcher;
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.util.Log;
-import android.os.Handler;
-import android.app.Activity;
-import android.view.View;
-import android.content.Context;
-import java.util.Map;
-import org.qtproject.qt5.android.QtNative;
-
-public class ExampleService {
-
- static {
-
- SystemDispatcher.addListener(new SystemDispatcher.Listener() {
-
- NotificationManager m_notificationManager;
- Notification.Builder m_builder;
-
- private void notificationManagerNotify(Map data) {
-
- final Activity activity = QtNative.activity();
- final Map messageData = data;
-
- Runnable runnable = new Runnable () {
- public void run() {
- try {
- String title = (String) messageData.get("title");
-
- String message = (String) messageData.get("message");
-
- if (m_notificationManager == null) {
- m_notificationManager = (NotificationManager) activity.getSystemService(Context.NOTIFICATION_SERVICE);
- m_builder = new Notification.Builder(activity);
-
- // Small Icon is a must to make notification works.
- // And that is why you need to inherit QtActivity
- //m_builder.setSmallIcon(drawable.icon);
- }
-
- m_builder.setContentTitle(title);
- m_builder.setContentText(message);
- m_notificationManager.notify(1, m_builder.build());
-
- // Test function. Remove it later.
- SystemDispatcher.dispatch("Notifier.notifyFinished");
- } catch (Exception e) {
- Log.d("",e.getMessage());
- }
-
- };
- };
- activity.runOnUiThread(runnable);
- }
-
- private void hapticFeedbackPerform(Map data) {
-
- final Activity activity = QtNative.activity();
- final Map messageData = data;
- Runnable runnable = new Runnable () {
- public void run() {
- int feedbackConstant = (Integer) messageData.get("feedbackConstant");
- int flags = (Integer) messageData.get("flags");
-
- Log.d("",String.format("hapticFeedbackPerform(%d,%d)",feedbackConstant,flags));
-
- View rootView = activity.getWindow().getDecorView().getRootView();
- rootView.performHapticFeedback(feedbackConstant, flags);
-
- // Test function. Remove it later.
- SystemDispatcher.dispatch("hapticFeedbackPerformFinished");
- };
- };
- activity.runOnUiThread(runnable);
- }
-
- public void onDispatched(String name , Map data) {
-
- if (name.equals("Notifier.notify")) {
- notificationManagerNotify(data);
- return;
- } else if (name.equals("hapticFeedbackPerform")) {
- hapticFeedbackPerform(data);
- return;
- }
-
- return;
- }
- });
-
- }
-
-}
-
diff --git a/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java b/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java
index 185e924..423f4aa 100644
--- a/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java
+++ b/source-android/androidnative.pri/java/src/androidnative/AndroidNativeActivity.java
@@ -41,7 +41,7 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt
// result of the request.
} else {
- System.loadLibrary("friendiqa");
+ System.loadLibrary("friendiqa_arm64-v8a");
if((getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY)) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_NEW_TASK) || (getIntent().getFlags() == Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) || (getIntent().getFlags() == (Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED))) {
SystemDispatcher.onActivityResume();
} else {
@@ -90,7 +90,7 @@ public class AndroidNativeActivity extends org.qtproject.qt5.android.bindings.Qt
protected void onNewIntent(Intent data) {
- System.loadLibrary("friendiqa");
+ System.loadLibrary("friendiqa_arm64-v8a");
super.onNewIntent(data);
if ((data!=null) && (data.getType() != null) && !(data.getBooleanExtra("used",false))){
String type = data.getType();
diff --git a/source-android/androidnative.pri/java/src/androidnative/AndroidNativeService.java b/source-android/androidnative.pri/java/src/androidnative/AndroidNativeService.java
index 8537bf1..55ef5db 100644
--- a/source-android/androidnative.pri/java/src/androidnative/AndroidNativeService.java
+++ b/source-android/androidnative.pri/java/src/androidnative/AndroidNativeService.java
@@ -20,7 +20,7 @@ public class AndroidNativeService extends QtService
private static String TAG = "AndroidNative";
public void startQtService(Context ctx) {
- Log.d(TAG, "QtActivity active "+String.valueOf(QtNative.activity()!=null));
+ //Log.d(TAG, "QtActivity active "+String.valueOf(QtNative.activity()!=null));
if (QtNative.activity()==null){
//Log.d(TAG,"Friendiqasync Stop existing QtService");
ctx.stopService(new Intent(ctx, AndroidNativeService.class));
@@ -55,7 +55,7 @@ public class AndroidNativeService extends QtService
NotificationManager.IMPORTANCE_DEFAULT);
channel.setSound(null,null);
((NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE)).createNotificationChannel(channel);
- //Log.d(TAG,"Friendiqa onCreate Notification");
+ Log.d(TAG,"Friendiqa onCreate Notification");
Notification notification = new Notification.Builder(context,CHANNEL_ID)
.setSmallIcon(R.drawable.friendiqanotification)
.setContentTitle("Friendiqa")
diff --git a/source-android/common/friendiqa.cpp b/source-android/common/friendiqa.cpp
index e87b78a..259a880 100644
--- a/source-android/common/friendiqa.cpp
+++ b/source-android/common/friendiqa.cpp
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -56,8 +56,8 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void*) {
#endif
-int main(int argc, char *argv[]) {
- //qDebug()<< "argv Friendiqa"<< argv[0]; //<<" argv2" <1){qDebug()<< "argc Friendiqa"<< argc <<" argv1" <1) && (qstrcmp(argv[1],"-service")==0)){
//qDebug()<<"FriendiqaMain Service";
QAndroidService app(argc, argv);
@@ -71,7 +71,7 @@ int main(int argc, char *argv[]) {
else{
QApplication app(argc, argv);
QQuickView view;
- qDebug()<<"FriendiqaMain started";
+ //qDebug()<<"FriendiqaMain started";
QTranslator qtTranslator;
qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations");
app.installTranslator(&qtTranslator);
diff --git a/source-android/friendiqa.pro b/source-android/friendiqa.pro
index 2f8fe6a..fdc129c 100644
--- a/source-android/friendiqa.pro
+++ b/source-android/friendiqa.pro
@@ -24,6 +24,17 @@ SOURCES += common/friendiqa.cpp \
common/remoteauthasyncimageprovider.cpp \
common/updatenews.cpp \
common/alarmandroid.cpp
+ lupdate_only{
+ SOURCES = qml/friendiqa.qml \
+ qml/*.qml
+ qml/calendarqml/*.qml
+ qml/configqml/*.qml
+ qml/genericqml/*.qml
+ qml/contactqml/*.qml
+ qml/newsqml/*.qml
+ qml/photoqml/*.qml
+ js/*.js
+ }
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
@@ -70,16 +81,6 @@ DISTFILES += \
js/*.js \
android/androidnative.gradle \
android/src/FriendiqaActivity.java \
- android/src/ExampleService.java
+ android/src/FriendiqaService.java
-contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
- ANDROID_EXTRA_LIBS = \
- $$PWD/android/libcrypto_1_1.so \
- $$PWD/android/libssl_1_1.so
-}
-
-contains(ANDROID_TARGET_ARCH,arm64-v8a) {
- ANDROID_EXTRA_LIBS = \
- /home/pankraz/ownCloud/clientsync/Friendiqa/v0.5.2/source-android/../../../../../git/android_openssl/arm64/libcrypto_1_1.so \
- $$PWD/../../../../../git/android_openssl/arm64/libssl_1_1.so
-}
+ANDROID_EXTRA_LIBS = $$PWD/android/arm/libcrypto_1_1.so $$PWD/android/arm/libssl_1_1.so $$PWD/android/arm64/libcrypto_1_1.so $$PWD/android/arm64/libssl_1_1.so
diff --git a/source-android/qml/friendiqa.qml b/source-android/qml/friendiqa.qml
index 956ea67..9f4955e 100644
--- a/source-android/qml/friendiqa.qml
+++ b/source-android/qml/friendiqa.qml
@@ -45,7 +45,7 @@ StackView{
height:osSettings.appHeight
property var db: ["Friendiqa", "1.0", "Stores Friendica data", 100000000]
property var login: Service.readActiveConfig(db)
- property var globaloptions: ({}) //Service.readGlobaloptions(db)
+ property var globaloptions: Service.readGO(db)
property var contactlist: []
property real mm: osSettings.osType=="Android"?Screen.pixelDensity:Screen.pixelDensity*1.5
signal messageSignal(var friend)
@@ -59,6 +59,7 @@ StackView{
signal uploadSignal(var urls)
signal sendtextSignal(var intenttext)
signal changeimage(var method, var type, var id)
+ signal updateSyncinterval(int interval)
property var news:[]
property var newContacts:[]
//property string contactLoadType: ""
@@ -67,7 +68,7 @@ StackView{
onLoginChanged:{
if(login==""){root.push("qrc:/qml/configqml/AccountPage.qml")}
else{root.push(rootStackItem)
- newstab.newstabstatus=login.newsViewType;
+ if (login.newsViewType!="" || login.newsViewType!=null){newstab.newstabstatus=login.newsViewType;}
Newsjs.getCurrentContacts(login,db,function(contacts){
contactlist=contacts})}
}
@@ -105,20 +106,20 @@ StackView{
FontLoader{id: fontAwesome; source: "qrc:/images/fontawesome-webfont.ttf"}
- Keys.onReleased: {
+ Keys.onReleased: {//print(event.key + "Backkey"+newstab.conversation.length+" "+root.depth)
if (event.key === osSettings.backKey) {
if (rootstack.currentIndex==0){
newstab.active=true;
- if (newstab.newstabstatus!=login.newsViewType){
- newstab.newstabstatus=login.newsViewType;
- if(login.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
+ if (newstab.newstabstatus!=globaloptions.newsViewType){
+ newstab.newstabstatus=globaloptions.newsViewType;
+ if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews)
})}
else{
Newsjs.chatsfromdb(db,login.username,function(dbnews){
newsSignal(dbnews)
})}
- }
+ }
else if (newstab.conversation.length>0){newstab.conversation=[]}
else if (root.depth>1){root.pop()}
@@ -285,7 +286,6 @@ StackView{
}
Label{
-
text: "\uf08b " +qsTr("Quit")
font.pixelSize: 4*mm
width: parent.width
@@ -303,9 +303,6 @@ StackView{
}
}
-
-
-
Item{
id:rootStackItem
width:parent.width
@@ -392,13 +389,13 @@ StackView{
}
Component.onCompleted: {
- forceActiveFocus();
- Service.readGlobaloptions(db,function(go){globaloptions=go})
+ forceActiveFocus();
//print(xhr.networktype());
if(osSettings.osType=="Android"){
var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
var IntentReceiverQml = component.createObject(root);
- } else if (osSettings.osType=="Linux"){
+ }
+ else if (osSettings.osType=="Linux"){
var component = Qt.createComponent("qrc:/qml/genericqml/LinuxSync.qml");
var LinuxSyncQml = component.createObject(root);
}
diff --git a/source-linux/common/alarm.h b/source-linux/common/alarm.h
index bd66f04..9d35fd0 100644
--- a/source-linux/common/alarm.h
+++ b/source-linux/common/alarm.h
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/common/alarmandroid.cpp b/source-linux/common/alarmandroid.cpp
index 6073baf..1bbc515 100644
--- a/source-linux/common/alarmandroid.cpp
+++ b/source-linux/common/alarmandroid.cpp
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/common/filesystem.cpp b/source-linux/common/filesystem.cpp
index c1668e4..fefdd3c 100644
--- a/source-linux/common/filesystem.cpp
+++ b/source-linux/common/filesystem.cpp
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/common/filesystem.h b/source-linux/common/filesystem.h
index c8baae8..39b6c68 100644
--- a/source-linux/common/filesystem.h
+++ b/source-linux/common/filesystem.h
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/common/friendiqa.cpp b/source-linux/common/friendiqa.cpp
index f06f39a..52ef822 100644
--- a/source-linux/common/friendiqa.cpp
+++ b/source-linux/common/friendiqa.cpp
@@ -73,8 +73,10 @@ int main(int argc, char *argv[]) {
//return app.exec();
}
else{
+ QtWebEngine::initialize();
QApplication app(argc, argv);
QQuickView view;
+ view.setResizeMode(QQuickView::SizeRootObjectToView);
QTranslator qtTranslator;
qtTranslator.load("friendiqa-" + QLocale::system().name(),":/translations");
app.installTranslator(&qtTranslator);
@@ -89,7 +91,7 @@ int main(int argc, char *argv[]) {
view.rootContext()->setContextProperty("alarm", alarm);
UPDATENEWS* updatenews = UPDATENEWS::instance();
view.rootContext()->setContextProperty("updatenews", updatenews);
- QtWebEngine::initialize();
+
view.setSource(QUrl("qrc:/qml/friendiqa.qml"));
view.show();
view.connect(view.rootContext()->engine(), SIGNAL(quit()), &app, SLOT(quit()));
diff --git a/source-linux/common/remoteauthasyncimageprovider.cpp b/source-linux/common/remoteauthasyncimageprovider.cpp
index 66a8b03..8d21faa 100644
--- a/source-linux/common/remoteauthasyncimageprovider.cpp
+++ b/source-linux/common/remoteauthasyncimageprovider.cpp
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/common/remoteauthasyncimageprovider.h b/source-linux/common/remoteauthasyncimageprovider.h
index f028ada..2d990a6 100644
--- a/source-linux/common/remoteauthasyncimageprovider.h
+++ b/source-linux/common/remoteauthasyncimageprovider.h
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/common/updatenews.cpp b/source-linux/common/updatenews.cpp
index b48bf83..d64ba34 100644
--- a/source-linux/common/updatenews.cpp
+++ b/source-linux/common/updatenews.cpp
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -128,18 +128,18 @@ void UPDATENEWS::login()
QSqlQuery synctimequery("SELECT * FROM globaloptions WHERE k='lastsync'",m_db);
if (synctimequery.next()){
QSqlQuery synctimequery2("UPDATE globaloptions SET v='"+QString::number(QDateTime::currentSecsSinceEpoch()) + "' WHERE k = 'lastsync'",m_db);
- if(!(synctimequery2.exec())) {qDebug()< contacts){
query.bindValue(16,contact["time_zone"].toString());
query.bindValue(17,contact["statuses_count"].toInt());
query.bindValue(18,contact["following"].toBool());
- query.bindValue(19,contact["verfied"].toBool());
+ query.bindValue(19,contact["verified"].toBool());
query.bindValue(20,contact["statusnet_blocking"].toBool());
query.bindValue(21,contact["notifications"].toBool());
query.bindValue(22,contact["statusnet_profile_url"]);
@@ -559,13 +584,65 @@ void UPDATENEWS::updateContacts(QList contacts){
query.bindValue(26,timestamp);
}
- query.exec() ;
+ if(!(query.exec())) {qDebug()<< "updatecontacts " << query.lastError();}
} catch(...){
qDebug() << "Friendiqasync Error inserting contact" << contact["screen_name"] << " " << contact.toString();
}
}
}
+
+void UPDATENEWS::storeEvents(QByteArray serverreply,QString apiname)
+{ if (apiname!=m_api || xhr.downloadtype()!=""){} else {
+ QJsonDocument events;
+ //qDebug()<","]"),eventitem["allow_gid"].toString().replace("<","[").replace(">","]"),eventitem["deny_cid"].toString().replace("<","[").replace(">","]"),eventitem["deny_gid"].toString().replace("<","[").replace(">","]")};
+ QJsonDocument permissionDocument; permissionDocument.setArray(permissions);
+ query.bindValue(13,permissionDocument.toJson(QJsonDocument::Compact));
+ if(!(query.exec())) {qDebug()<< "store events " << query.lastError();}
+ } catch(...){
+ qDebug() << "Friendiqasync Error event" << eventitem["name"];
+ }
+ }
+ emit this->success(m_api);
+ }
+ }
+ if(notifylist.contains("notify_Events")){
+ QSqlQuery eventnotifyquery("SELECT start,title FROM events WHERE (start BETWEEN " + QString::number(QDateTime::currentDateTime().toMSecsSinceEpoch()) + " AND "+QString::number(QDateTime::currentDateTime().toMSecsSinceEpoch()+(m_updateInterval*60*1000))+") AND username='"+ username +"'",m_db);
+ while (eventnotifyquery.next()) {
+ alarm.notify("Event: "+ QDateTime::fromMSecsSinceEpoch(eventnotifyquery.value(0).toLongLong()).toString("dd.MM.yyyy hh:mm"),eventnotifyquery.value(1).toString(),1);
+ }
+ }
+ if(m_updateInterval!=0){
+ syncindex+=1;
+ startsync();
+ }
+ QObject::disconnect(&xhr,SIGNAL(success(QByteArray,QString)),this,SLOT(storeEvents(QByteArray,QString)));
+}
+
QString UPDATENEWS::url() const
{
return m_url;
@@ -583,7 +660,7 @@ void UPDATENEWS::startImagedownload()
void UPDATENEWS::showError(QString data, QString url,QString api, int code )
{
- qDebug() << "showerror " << api << " data " << data;
+ //qDebug() << "showerror " << api << " data " << data;
emit this->error(api,data);
if (api!=m_api || xhr.downloadtype()!=""){} else{
if(m_updateInterval!=0){
diff --git a/source-linux/common/updatenews.h b/source-linux/common/updatenews.h
index 74acf20..b44b558 100644
--- a/source-linux/common/updatenews.h
+++ b/source-linux/common/updatenews.h
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -68,10 +68,12 @@ public slots:
void startsync();
void directmessages();
void notifications();
+ void events();
//void startservice(QString type,QVariantMap map);
void startImagedownload();
void updateImageLocation(QString downloadtype,QString imageurl, QString filename, int index);
void store(QByteArray serverreply,QString apiname);
+ void storeEvents(QByteArray serverreply,QString apiname);
void showError(QString data, QString url,QString api, int code);
private:
diff --git a/source-linux/common/uploadableimage.cpp b/source-linux/common/uploadableimage.cpp
index 23ef7fc..221f13b 100644
--- a/source-linux/common/uploadableimage.cpp
+++ b/source-linux/common/uploadableimage.cpp
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/common/uploadableimage.h b/source-linux/common/uploadableimage.h
index 810e4e8..d232d98 100644
--- a/source-linux/common/uploadableimage.h
+++ b/source-linux/common/uploadableimage.h
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/common/xhr.cpp b/source-linux/common/xhr.cpp
index 76e2f06..f50a13d 100644
--- a/source-linux/common/xhr.cpp
+++ b/source-linux/common/xhr.cpp
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -292,7 +292,7 @@ void XHR::post()
void XHR::onReplyError(QNetworkReply::NetworkError code)
{
qDebug() << code;
- emit this->error( bufferToString(), m_url,m_api, (int) code);
+ if(downloadtype()!="contactlist"){emit this->error( bufferToString(), m_url,m_api, (int) code);}
buffer.clear();
reply->deleteLater();
if((downloadtype()=="contactlist")||(downloadtype()=="picturelist")){dlindex=dlindex+1;XHR::getlist();}
diff --git a/source-linux/common/xhr.h b/source-linux/common/xhr.h
index 9141a84..d283b95 100644
--- a/source-linux/common/xhr.h
+++ b/source-linux/common/xhr.h
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/friendiqa.pro b/source-linux/friendiqa.pro
index e6f40de..a9313c9 100644
--- a/source-linux/friendiqa.pro
+++ b/source-linux/friendiqa.pro
@@ -47,8 +47,6 @@ HEADERS += \
DISTFILES += \
qml/calendarqml/*.qml \
- qml/newsqml/Lastcomment.qml \
- qml/newsqml/NewsVideoLarge.qml \
translations/*.ts \
translations/*.qm \
qml/*.qml \
@@ -57,8 +55,7 @@ DISTFILES += \
qml/photoqml/*.qml \
qml/configqml/*.qml \
js/*.js \
- qml/newsqml/NewsStack.qml \
- qml/configqml/SyncComponent.qml
+
target.path=/usr/bin
desktop.path = /usr/share/applications
diff --git a/source-linux/js/friendworker.js b/source-linux/js/friendworker.js
index 1d30709..ab97351 100644
--- a/source-linux/js/friendworker.js
+++ b/source-linux/js/friendworker.js
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/js/helper.js b/source-linux/js/helper.js
index 3bcb523..c69d524 100644
--- a/source-linux/js/helper.js
+++ b/source-linux/js/helper.js
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/js/image.js b/source-linux/js/image.js
index de5296c..c7c5908 100644
--- a/source-linux/js/image.js
+++ b/source-linux/js/image.js
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/js/layout.js b/source-linux/js/layout.js
index 6431819..6989a63 100644
--- a/source-linux/js/layout.js
+++ b/source-linux/js/layout.js
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/js/news.js b/source-linux/js/news.js
index ab4a39c..cd1fecf 100644
--- a/source-linux/js/news.js
+++ b/source-linux/js/news.js
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -102,7 +102,7 @@ function getLastNews(login,database,callback){
var lastnewsid=0;
db.transaction( function(tx) {
var result = tx.executeSql('SELECT status_id from news WHERE username="'+login.username+'" AND messagetype=0 ORDER BY status_id DESC LIMIT 1');
- try{lastnewsid=result.rows.item(0).status_id;}catch(e){print(e)};
+ try{lastnewsid=result.rows.item(0).status_id;}catch(e){lastnewsid=0};
callback(lastnewsid)
})
}
@@ -292,7 +292,7 @@ function newsfromdb(database,login,messagetype,callback,contact,stop_time){
newsArray[i].statusnet_html=Qt.atob(newsArray[i].statusnet_html);
newsArray[i].text=Qt.atob(newsArray[i].text);
newsArray[i].id=newsArray[i].status_id;
- newsArray[i].friendica_author=newsArray[i].friendica_owner
+ newsArray[i].friendica_author=objFromArray(allcontacts,"url",newsArray[i].friendica_owner)
newsArray[i]=fetchUsersForNews(database,login.username,newsArray[i],allcontacts);
if (newsArray[i].attachments!="" && newsArray[i].attachments!==null){newsArray[i].attachments=JSON.parse(Qt.atob(newsArray[i].attachments))};
}
@@ -487,6 +487,7 @@ function chatsfromdb(database,login,messagetype,callback,stop_time){
helpernews.statusnet_html=Qt.atob(helpernews.statusnet_html);
helpernews.text=Qt.atob(helpernews.text);
helpernews.id=helpernews.status_id;
+ helpernews.friendica_author=objFromArray(allcontacts,"url",helpernews.friendica_owner);
if (helpernews.attachments!="" && helpernews.attachments!==null){helpernews.attachments=JSON.parse(Qt.atob(helpernews.attachments))};
helpernews.currentconversation=[];
for (var h = 0;h
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -36,43 +36,27 @@ function findend (text, startpos) {
function beautify(newsitemobject,msg){
var forumname="";
- try{if (newsitemobject.messagetype==0&&newsitemobject.hasOwnProperty('friendica_author')&&
+ try{
+ if (newsitemobject.messagetype==0&&newsitemobject.hasOwnProperty('friendica_author')&&
((newsitemobject.friendica_author.url)!=(newsitemobject.user.url))&&((newsitemobject.friendica_author.url)!=null)){
- //print(" Friendica Author "+JSON.stringify(newsitemobject));
- forumname=" via "+newsitemobject.user.name;
- newsitemobject.user=newsitemobject.friendica_author;
- }}catch(e){print("forum name "+e)}
- var likeText="";var dislikeText="";var attendyesText="";var attendnoText="";var attendmaybeText=""; var self={};
- try{if (newsitemobject.messagetype==0&&newsitemobject.hasOwnProperty('friendica_activities')){
- if (newsitemobject.friendica_activities.like.length>0){
- if (newsitemobject.friendica_activities.like.length==1){likeText= newsitemobject.friendica_activities.like[0].name+" "+ qsTr("likes this.")}
- else {likeText= newsitemobject.friendica_activities.like.length+" "+ qsTr("like this.")}
- }
- if (newsitemobject.friendica_activities.dislike.length>0){
- if (newsitemobject.friendica_activities.dislike.length==1){dislikeText= newsitemobject.friendica_activities.dislike[0].name+" "+ qsTr("doesn't like this.")}
- else {dislikeText= newsitemobject.friendica_activities.dislike.length+" "+ qsTr("don't like this.")}
- }
- if (newsitemobject.friendica_activities.attendyes.length>0){
- if (newsitemobject.friendica_activities.attendyes.length==1){attendyesText=newsitemobject.friendica_activities.attendyes[0].name+" "+ qsTr("will attend.")}
- else {attendyesText= newsitemobject.friendica_activities.attendyes.length+" "+ qsTr("persons will attend.")}
- }
- if (newsitemobject.friendica_activities.attendno.length>0){
- if (newsitemobject.friendica_activities.attendno.length==1){attendnoText= newsitemobject.friendica_activities.attendno[0].name+" "+ qsTr("will not attend.")}
- else {attendnoText= newsitemobject.friendica_activities.attendno.length+" "+ qsTr("persons will not attend.")}
- }
- if (newsitemobject.friendica_activities.attendmaybe.length>0){
- if (newsitemobject.friendica_activities.attendmaybe.length==1){attendmaybeText= newsitemobject.friendica_activities.attendmaybe[0].name+" "+ qsTr("may attend.")}
- else {attendmaybeText= newsitemobject.friendica_activities.attendmaybe.length+" "+ qsTr("persons may attend.")}
- }
- //var friendica_activities_self=JSON.parse(newsitemobject.friendica_activities_self);
- if (newsitemobject.hasOwnProperty("friendica_activities_self")){
- if (newsitemobject.friendica_activities_self.indexOf(3)!=-1){self.attending=qsTr("yes")}
- if (newsitemobject.friendica_activities_self.indexOf(4)!=-1){self.attending=qsTr("no")}
- if (newsitemobject.friendica_activities_self.indexOf(5)!=-1){self.attending=qsTr("maybe")}
- if (newsitemobject.friendica_activities_self.indexOf(1)!=-1){self.liked=1}
- if (newsitemobject.friendica_activities_self.indexOf(2)!=-1){self.disliked=1}
- }}} catch(e){print("Activities "+e+ " "+JSON.stringify(newsitemobject.friendica_activities))}
- var friendica_activities={likeText:likeText,dislikeText:dislikeText,attendyesText:attendyesText,attendnoText:attendnoText,attendmaybeText:attendmaybeText,self:self}
+ //print(" Friendica Author "+JSON.stringify(newsitemobject));
+ forumname=" via "+newsitemobject.user.name;
+ newsitemobject.user=newsitemobject.friendica_author;
+ }
+ if (typeof(newsitemobject.friendica_activities_self)=="string"){
+ newsitemobject.friendica_activities_self=JSON.parse(newsitemobject.friendica_activities_self);
+ }
+ }catch(e){print("forum name "+e)}
+
+ var self=({})
+ if (newsitemobject.hasOwnProperty("friendica_activities_self")){
+ if (newsitemobject.friendica_activities_self.indexOf(3)!=-1){self.attending=qsTr("yes")}
+ if (newsitemobject.friendica_activities_self.indexOf(4)!=-1){self.attending=qsTr("no")}
+ if (newsitemobject.friendica_activities_self.indexOf(5)!=-1){self.attending=qsTr("maybe")}
+ if (newsitemobject.friendica_activities_self.indexOf(1)!=-1){self.liked=1}
+ if (newsitemobject.friendica_activities_self.indexOf(2)!=-1){self.disliked=1}
+ }
+ var friendica_activities={self:self}
var attachmentList=[];
var videoformats=["mp4", "avi", "webm","ogg","mp3"]
try{if(newsitemobject.attachments){
@@ -119,11 +103,8 @@ function beautify(newsitemobject,msg){
ptvideotext=ptvideotext.substring(ptposend,ptvideotext.length)
if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=ptvideohelper.url)){attachmentList.push(ptvideohelper)}
}
- }
- if (newsitemobject.text.indexOf("youtube.com/watch?v")>-1){
- //print("message "+msg.options.showWebsiteForLinks);
- //if (msg.options.showYoutube!="false"){
-
+ }
+ if (newsitemobject.text.indexOf("youtube.com/watch?v")>-1){
var yttext=newsitemobject.text;
while (yttext.indexOf("youtube.com/watch?v")>-1){
var ythelperstringposition=yttext.indexOf("watch?v=");
@@ -133,44 +114,14 @@ function beautify(newsitemobject,msg){
yttext=yttext.substring(ytposend,yttext.length);
if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=ythelper.url)){attachmentList.push(ythelper)}
}
- //}
- }
-
-// if (newsitemobject.text.indexOf(".html")>-1){
-// //print("message "+msg.options.showWebsiteForLinks);
-// if (msg.options.showWebsiteForLinks!="false"){
-// var linkhelper={mimetype:"text/html"}
-// var linktext=newsitemobject.text;
-// while (linktext.indexOf(".html")>-1){
-// var linkhelperstringposition=linktext.indexOf(".html");
-// var linkposend=findend(linktext,linkhelperstringposition);
-// linkhelper.url=linktext.substring(linktext.lastIndexOf("http",linkhelperstringposition),linkposend);
-// linktext=linktext.substring(linkhelperstringposition+5,linktext.length)
-// if ((attachmentList.length==0) || (attachmentList[attachmentList.length-1].url!=linkhelper.url)){attachmentList.push(linkhelper)}
-// }
-// }
-// }
-
+ }
newsitemobject.attachmentList=attachmentList;
if ((msg.options.hasOwnProperty("hide_nsfw"))&&(msg.options.hide_nsfw==1)&&(newsitemobject.text.indexOf("#nsfw")>-1)){
newsitemobject.nsfw=true
} else{newsitemobject.nsfw=false}
- var seconds=(msg.currentTime-newsitemobject.created_at)/1000;
- var timestring="";
- if (seconds<60) {timestring=seconds+" "+qsTr("seconds") +" "+qsTr("ago");}
- else if (seconds<90){timestring=Math.round(seconds/60)+" "+qsTr("minute") +" "+qsTr("ago");}
- else if (seconds<3600){timestring=Math.round(seconds/60)+" "+qsTr("minutes") +" "+qsTr("ago");}
- else if (seconds<5400){timestring=Math.round(seconds/3600)+" "+qsTr("hour") +" "+qsTr("ago");}
- else if (seconds<86400){timestring=Math.round(seconds/3600)+" "+qsTr("hours") +" "+qsTr("ago");}
- else if (seconds<129600){timestring=Math.round(seconds/86400)+" "+qsTr("day") +" "+qsTr("ago");}
- else if (seconds<3888000){timestring=Math.round(seconds/86400)+" "+qsTr("days") +" "+qsTr("ago");}
- else if (seconds<5832000){timestring=Math.round(seconds/3888000)+" "+qsTr("month") +" "+qsTr("ago");}
- else if (seconds<69984000){timestring=Math.round(seconds/3888000)+" "+qsTr("months") +" "+qsTr("ago");}
- else {timestring=Math.round(seconds/46656000)+" "+qsTr("years") +" "+qsTr("ago");}
-
- newsitemobject.dateDiff=timestring;
+ newsitemobject.dateDiff=(msg.currentTime-newsitemobject.created_at)/1000;
newsitemobject.friendica_activities_view=friendica_activities;
newsitemobject.forumname=forumname;
return newsitemobject;
@@ -184,27 +135,28 @@ if(msg.deleteId!==undefined)
msg.model.sync()
}
else{
- if(msg.method=="refresh"){msg.model.clear()};
+ if(msg.method=="refresh" ||msg.method=="conversation"){msg.model.clear()};
msg.model.sync()
for (var j=0;j1)){
newsitemobject.lastcomment=beautify(newsitemobject.currentconversation[newsitemobject.currentconversation.length-1],msg);
//print("Currentconversation" + newsitemobject.currentconversation.length+JSON.stringify(newsitemobject.lastcomment))
}
+
+ if (msg.method=="conversation"){
+ if (j==0){newsitemobject.indent=0}else{
+ for (var k=msg.model.count-1;k>-1;k--){
+ if (newsitemobject.in_reply_to_status_id==msg.model.get(k).newsitemobject.id){
+ newsitemobject.indent=msg.model.get(k).newsitemobject.indent+1;
+ if (newsitemobject.indent>6){newsitemobject.indent=6};
+ break}
+ }
+ }}
+
var data=({"newsitemobject": newsitemobject})
}
@@ -216,7 +168,6 @@ else{
}
if (j==msg.news.length){
- //print("j: "+j+" msg.model.count: "+msg.model.count);
msg.model.sync()
}
}
diff --git a/source-linux/js/photoworker.js b/source-linux/js/photoworker.js
index 029c78e..eff840f 100644
--- a/source-linux/js/photoworker.js
+++ b/source-linux/js/photoworker.js
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/js/service.js b/source-linux/js/service.js
index dde31bd..8f79b08 100644
--- a/source-linux/js/service.js
+++ b/source-linux/js/service.js
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -90,14 +90,23 @@ function newscount(database, callback){
function eventsfromdb(database, username,callback){
var db=Sql.LocalStorage.openDatabaseSync(database[0],database[1],database[2],database[3]);
+ var allcontacts=[];
+ allcontacts=Newsjs.getAllContacts(root.db,login.username);
db.transaction( function(tx) {
var eventrs=tx.executeSql('select * from events WHERE username="'+username+'" ORDER BY start ASC');
var eventArray=[];
var dayArray=[];
for(var i = 0; i < eventrs.rows.length; i++) {
eventArray.push(eventrs.rows.item(i));
- // eventArray[i]=fetchUsersForNews(database,username,newsArray[i])
- dayArray.push(Math.floor(eventrs.rows.item(i).start/86400000));
+ if (eventArray[i].cid!=0){eventArray[i]["eventOwner"]=Newsjs.objFromArray(allcontacts,"cid",eventArray[i].cid);}
+ else{eventArray[i]["eventOwner"]=Newsjs.objFromArray(allcontacts,"isFriend",2);}
+ var startday=Math.floor((eventArray[i].start-new Date(eventArray[i].start).getTimezoneOffset() * 60 * 1000)/86400000);
+ var endday=Math.floor((eventArray[i].end-1-new Date(eventArray[i].end).getTimezoneOffset() * 60 * 1000)/86400000);if (enddaystartday){
+ for (var j=startday+1;j
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/qml/calendarqml/CalendarDay.qml b/source-linux/qml/calendarqml/CalendarDay.qml
index cfc1488..c9dbc96 100644
--- a/source-linux/qml/calendarqml/CalendarDay.qml
+++ b/source-linux/qml/calendarqml/CalendarDay.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -36,7 +36,7 @@ Item {
id: calendarDay
width:7*mm
height: 7*mm
- property int dateInt:Math.floor((Date.parse(model.date)-(new Date().getTimezoneOffset() * 60 * 1000))/86400000)
+ property int dateInt: Math.floor(Date.parse(model.date)/86400000) //Math.floor((Date.parse(model.date)-(new Date().getTimezoneOffset() * 60 * 1000))/86400000)
Rectangle {
id: placeHolder
color: 'lightblue'; antialiasing: true
@@ -54,7 +54,7 @@ Item {
}
Rectangle {
id:eventRect
- color:"black"
+ color:"grey"
anchors.margins: 0.5*mm
anchors.bottom: calendarDay.bottom
width: parent.width-mm
@@ -64,15 +64,9 @@ Item {
MouseArea {
anchors.fill: calendarDay
onClicked: {
- var eventDate=[];
- var idx = eventdays.indexOf(dateInt);
- while (idx != -1) {
- eventDate.push(idx);
- idx = eventdays.indexOf(dateInt,idx + 1)
- }
var component = Qt.createComponent("qrc:/qml/calendarqml/EventList.qml");
if (component.status== Component.Ready){
- var eventlist = component.createObject(calendartab,{"daylist": eventDate})}
+ var eventlist = component.createObject(calendartab,{"dayint": dateInt})}
}
}
}
diff --git a/source-linux/qml/calendarqml/CalendarTab.qml b/source-linux/qml/calendarqml/CalendarTab.qml
index 10b4e78..9e6884a 100644
--- a/source-linux/qml/calendarqml/CalendarTab.qml
+++ b/source-linux/qml/calendarqml/CalendarTab.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.0
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import QtQml 2.2
import Qt.labs.calendar 1.0
//import QtQuick.Controls 1.2 as Oldcontrol
@@ -51,7 +51,7 @@ Rectangle {
property int offsetTime: currentTime.getTimezoneOffset() * 60 * 1000
property var events:[]
property var eventdays:[]
- //onEventdaysChanged: print(JSON.stringify(eventdays))
+
function showEvents(friend){
if(friend=="backButton"){Service.eventsfromdb(db,login.username,function(eventArray,dayArray){
@@ -94,9 +94,24 @@ Rectangle {
width: 8*mm
text:"\uf021"
onClicked: {
- Service.getEvents(db,login, calendartab,function(){
- showEvents("")
- })}}
+ calBusy.running=true;
+ updatenews.setDatabase();
+ updatenews.login();
+ updatenews.events();
+// Service.getEvents(db,login, calendartab,function(){
+// showEvents("")
+// })
+ }}
+
+Connections{
+ target: updatenews
+
+ onSuccess:{
+ calBusy.running=false;
+ showEvents("")
+ }
+ }
+
MButton{
id: calendartabstatusButton
diff --git a/source-linux/qml/calendarqml/EventList.qml b/source-linux/qml/calendarqml/EventList.qml
index 5028ae7..e5629b4 100644
--- a/source-linux/qml/calendarqml/EventList.qml
+++ b/source-linux/qml/calendarqml/EventList.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.0
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/js/service.js" as Service
import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml"
@@ -44,7 +44,7 @@ Rectangle{
x:mm
y:mm
property var daylist:[]
-
+ property int dayint: 0
MButton{
id:closeButton
anchors.top: parent.top
@@ -71,10 +71,12 @@ Rectangle{
id: eventModel
}
- Component.onCompleted:{
- for (var i=0; i(dayint>=event.startday)&&(dayint<=event.endday));
+ for (var i=0; i0?new Date(event.end).toLocaleString(Qt.locale(),Locale.NarrowFormat):" ")+": "+event.title //+calendarrectangle.offsetTime
font.pixelSize: 3*mm
wrapMode:Text.Wrap
}
Text {
id:eventDetailsText
- x:mm
+ x:8*mm
z:4
- width: parent.width
+ width: parent.width-8*mm
height: contentHeight
- text: status==""?"":Qt.atob(event.html)
+ textFormat: Text.RichText
+ text: status==""?"":Qt.atob(event.desc) + (event.location==""?"":"
"+qsTr("Location")+": "+event.location)//Qt.atob(event.html)
anchors.top: eventNameText.bottom
font.pixelSize: 3*mm
wrapMode:Text.Wrap
+ onLinkActivated:{Qt.openUrlExternally(link)}
}
MouseArea{
anchors.fill: parent
diff --git a/source-linux/qml/configqml/AccountPage.qml b/source-linux/qml/configqml/AccountPage.qml
index 5473f24..f9d88c7 100644
--- a/source-linux/qml/configqml/AccountPage.qml
+++ b/source-linux/qml/configqml/AccountPage.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
import QtQuick 2.7
import QtQuick.Dialogs 1.2
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/js/service.js" as Service
import "qrc:/js/layout.js" as Layoutjs
@@ -61,6 +61,8 @@ Page{
x: mm
y: mm
width: root.width/2
+ visible: users.length>0
+
onClicked:{
var useritems="";
for (var i=0;i0
text: "-"
font.pixelSize: 3*mm
onClicked:{
@@ -368,7 +371,7 @@ Page{
password.text="";
imagestore.text="";
//maxNews.value=0;
- newsTypeField.text="Conversations";
+ //newsTypeField.text="Conversations";
//messageIntervalSlider.value=30;
userButton.text=qsTr("User");
Helperjs.readData(db,"config","",function(storedUsers){
@@ -381,6 +384,7 @@ Page{
Button {
x: parent.width/2+8*mm; y: mm; width: 5*mm; height: 8*mm;
+ visible: users.length>0
text: "+"
font.pixelSize: 3*mm
onClicked:{
@@ -391,7 +395,7 @@ Page{
password.text=""
imagestore.text=""
//maxNews.value=0
- newsTypeField.text="Conversations"
+ //newsTypeField.text="Conversations"
//messageIntervalSlider.value=30
userButton.text=qsTr("User")
}
@@ -409,6 +413,7 @@ Page{
id:closeButton
height: 8*mm
width: 5*mm
+ visible: users.length>0
anchors.top: parent.top
anchors.topMargin: 1*mm
anchors.right: parent.right
@@ -417,19 +422,19 @@ Page{
font.pixelSize: 3*mm
onClicked:{root.pop()}
}
- Menu {
- id:newstypemenu
- MenuItem {
- font.pixelSize: 3*mm
- text: qsTr("Timeline")
- onTriggered: {newsTypeField.text="Timeline"}
- }
- MenuItem {
- font.pixelSize: 3*mm
- text: qsTr("Conversations")
- onTriggered: {newsTypeField.text="Conversations"}
- }
- }
+// Menu {
+// id:newstypemenu
+// MenuItem {
+// font.pixelSize: 3*mm
+// text: qsTr("Timeline")
+// onTriggered: {newsTypeField.text="Timeline"}
+// }
+// MenuItem {
+// font.pixelSize: 3*mm
+// text: qsTr("Conversations")
+// onTriggered: {newsTypeField.text="Conversations"}
+// }
+// }
Component.onCompleted: {
try{Helperjs.readData(db,"config","",function(storedUsers){
@@ -445,12 +450,12 @@ Page{
password.text=Qt.atob(obj.password);
imagestore.text=obj.imagestore;
//maxNews.value=obj.maxnews;
- newsTypeField.text=obj.newsViewType;
+ //newsTypeField.text=obj.newsViewType;
//messageIntervalSlider.value=obj.timerInterval;
if( obj.isActive==0){userButton.font.bold='true'} else {userButton.font.bold='false'}
},"isActive",0)
})}
- catch (e){print(e)
+ catch (e){//print("onCompleted" +users.count +e)
// Helperjs.friendicaWebRequest("https://dir.friendica.social/servers/surprise",accountPage,function(html){
// print(html);
// var bpos=html.indexOf("base ");
diff --git a/source-linux/qml/configqml/ConfigPage.qml b/source-linux/qml/configqml/ConfigPage.qml
index 6b1cfa1..f95662b 100644
--- a/source-linux/qml/configqml/ConfigPage.qml
+++ b/source-linux/qml/configqml/ConfigPage.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -31,11 +31,9 @@
import QtQuick 2.11
import QtQuick.Dialogs 1.2
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/js/service.js" as Service
-//import "qrc:/js/layout.js" as Layoutjs
-//import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/configqml"
import "qrc:/qml/genericqml"
@@ -43,85 +41,92 @@ Page{
//anchors.fill: parent
width:root.width
height:root.height
- //contentHeight: configBackground.height
- //boundsBehavior: Flickable.StopAtBounds
-
-// Rectangle{
-// id:configBackground
-// color: "white"
-// anchors.fill: parent
-// width:parent.width
-// height:Math.max(90*mm,root.height-12*mm)
-// property var users:[]
-// property bool registeredUser: true
-// property var userdata: ({})
-// Text {
-// text: qsTr("Image dir.")
-// //text: qsTr("Max. News")
-// font.pixelSize:3*mm
-// x: 4*mm; y: 10*mm
-// }
- Text {
- text: qsTr("Max. News")
- //text: qsTr("News as")
- font.pixelSize:3*mm
- x: 4*mm; y:10*mm
+ Rectangle{
+ x: 4*mm; y:13.5*mm; width: parent.width - 14*mm; height: 5*mm;
+ color:"light grey"
+ radius: 0.5*mm
+ Text{
+ anchors.fill: parent
+ font.pixelSize:3*mm
+ text:qsTr("Sync")
+ }
+ MouseArea{
+ anchors.fill:parent
+ onClicked:root.push("qrc:qml/configqml/SyncConfig.qml");
+ }
}
-
-// Text {
-// text: qsTr("Show Website")
-// x: 4*mm; y: 40*mm; width: 20*mm
-// }
+ Text {
+ text: qsTr("News as")
+ font.pixelSize:3*mm
+ x: 4*mm; y: 20*mm
+ }
+
+ Rectangle{
+ x: 4*mm; y: 23.5*mm; width: newsTypeField.contentWidth+2*mm; height: 5*mm;
+ color:"light grey"
+ radius: 0.5*mm
+ Text{
+ id: newsTypeField
+ anchors.fill: parent
+ font.pixelSize:3*mm
+ text:qsTr("Conversations")
+ }
+ MouseArea{
+ anchors.fill:parent
+ onClicked:newstypemenu.popup()
+ }
+ }
+ Menu {
+ id:newstypemenu
+ MenuItem {
+ font.pixelSize: 3*mm
+ text: qsTr("Timeline")
+ onTriggered: {newsTypeField.text=qsTr("Timeline");
+ Service.updateglobaloptions(root.db,"newsViewType","Timeline");}
+ }
+ MenuItem {
+ font.pixelSize: 3*mm
+ text: qsTr("Conversations")
+ onTriggered: {newsTypeField.text=qsTr("Conversations");
+ Service.updateglobaloptions(root.db,"newsViewType","Conversations");}
+ }
+ }
-// Rectangle{color: "light grey"; x: 4*mm; y: 13.5*mm; width: root.width-14*mm; height: 5*mm;}
-// Flickable {
-// id: imagestoreFlickable
-// x: 4*mm; y: 13.5*mm; width: root.width-14*mm; height: 5*mm;
-// clip: true
-// TextInput {
-// id: imagestore
-// width: imagestoreFlickable.width
-// height: imagestoreFlickable.height
-// font.pixelSize:3*mm
-// wrapMode: TextEdit.NoWrap
-// onCursorRectangleChanged: Layoutjs.ensureVisibility(cursorRectangle,imagestoreFlickable)
-// }
-// }
-
-// FileDialog {
-// id: imagestoreDialog
-// title: "Please choose a directory"
-// folder: shortcuts.pictures
-// selectFolder: true
-// onAccepted: {
-// var imagestoreString=imagestoreDialog.folder.toString();
-// imagestoreString=imagestoreString.replace(/^(file:\/{2})/,"")+"/"
-// imagestore.text=imagestoreString
-// }
-// }
-
-// Button {
-// x: root.width-9*mm; y: 13.5*mm; width: 7*mm; height: 8*mm;
-// text: "..."
-// onClicked:
-// {imagestoreDialog.open()}
-// }
-
+ Text {
+ text: qsTr("Max. News")
+ font.pixelSize:3*mm
+ x: 4*mm; y:30*mm
+ }
Slider{ id: maxNews
- x:19*mm; y: 13.5*mm;width: root.width/2;height:5*mm
+ x:19*mm; y: 33.5*mm;width: root.width/2;height:5*mm
from: 0;to:2000; stepSize: 100
value: root.globaloptions.hasOwnProperty("max_news")?root.globaloptions.max_news:1000
}
+ Rectangle{color: "light grey"; x: 4*mm; y: 33.5*mm; width: 9*mm; height: 5*mm;
+ radius: 0.5*mm
+ TextEdit{id:maxNewsText;
+ anchors.fill: parent
+ font.pixelSize:3*mm
+ verticalAlignment:TextEdit.AlignRight
+ text:maxNews.value
+ selectByMouse: true
+ onTextChanged: {
+ Service.updateglobaloptions(root.db,"max_news",text);
+ }
+ }
+ }
+
+
CheckBox{
id: nsfwCheckbox
x: 4*mm
- y: 33.5*mm
+ y: 43.5*mm
font.pixelSize: 3*mm
//width:5*mm
text: qsTr("Hide #nsfw?")
@@ -137,69 +142,6 @@ Page{
}
}
- Rectangle{color: "light grey"; x: 4*mm; y: 13.5*mm; width: 9*mm; height: 5*mm;
- radius: 0.5*mm
- TextEdit{id:maxNewsText;
- anchors.fill: parent
- font.pixelSize:3*mm
- verticalAlignment:TextEdit.AlignRight
- text:maxNews.value
- focus: true
- selectByMouse: true
- onTextChanged: {
- Service.updateglobaloptions(root.db,"max_news",text);
- }
- }
- }
- Rectangle{
- x: 4*mm; y:23.5*mm; width: parent.width - 14*mm; height: 5*mm;
- color:"light grey"
- radius: 0.5*mm
- Text{
- anchors.fill: parent
- font.pixelSize:3*mm
- text:qsTr("Sync")
- }
- MouseArea{
- anchors.fill:parent
- onClicked:root.push("qrc:qml/configqml/SyncConfig.qml");
- }
- }
-// Slider{ id: messageIntervalSlider
-// x:22*mm; y: 73.5*mm;width: root.width/2;height:5*mm
-// from: 0;to:120; stepSize: 15
-// }
-// Rectangle{
-// x: 4*mm; y: 73.5*mm; width: 9*mm; height: 5*mm;
-// TextEdit{
-// id: messageIntervalField
-// anchors.fill: parent
-// font.pixelSize:3*mm
-// verticalAlignment:TextEdit.AlignRight
-// text:messageIntervalSlider.value
-// focus: true
-// selectByMouse: true
-// }
-// }
-// Text{x: 14*mm; y: 73.5*mm; width: 5*mm; height: 5*mm;
-// font.pixelSize:3*mm
-// text:qsTr("Min.")
-// }
-
-// CheckBox{
-// id:showwebsiteCheckbox
-// x:35*mm;y:80*mm
-// onClicked:{
-// if (checked==true){
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","true")
-// root.globaloptions.showWebsiteForLinks="true"
-// }
-// else {
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","false")
-// root.globaloptions.showWebsiteForLinks="false"
-// }
-// }
-// }
MButton {
anchors.right: closeButton.left; anchors.rightMargin: mm;
@@ -224,22 +166,4 @@ Page{
font.pixelSize: 3*mm
onClicked:{root.pop()}
}
-// Menu {
-// id:newstypemenu
-// MenuItem {
-// text: qsTr("Timeline")
-// onTriggered: {newsTypeField.text="Timeline"}
-// }
-// MenuItem {
-// text: qsTr("Conversations")
-// onTriggered: {newsTypeField.text="Conversations"}
-// }
-// }
-
-// Component.onCompleted: {
-// Service.readGlobaloptions(db,function(go){
-// if(go.hasOwnProperty("max_news")){maxNews.value=go.max_news}else{maxNews.value=1000}
-// //if (root.globaloptions.showWebsiteForLinks!="false"){showwebsiteCheckbox.checked=true}
-// })
-// }
}
diff --git a/source-linux/qml/configqml/ConfigTab.qml b/source-linux/qml/configqml/ConfigTab.qml
deleted file mode 100644
index e13aefd..0000000
--- a/source-linux/qml/configqml/ConfigTab.qml
+++ /dev/null
@@ -1,482 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.7
-import QtQuick.Dialogs 1.2
-import QtQuick.Controls 1.2
-
-import "qrc:/js/service.js" as Service
-import "qrc:/js/layout.js" as Layoutjs
-import "qrc:/js/helper.js" as Helperjs
-import "qrc:/qml/configqml"
-import "qrc:/qml/genericqml"
-
-StackView{
- id: configStack
- anchors.fill:parent
- initialItem: Flickable{
- width:root.width-5*mm
- height:root.height-12*mm
- contentHeight: configBackground.height
- boundsBehavior: Flickable.StopAtBounds
-
- Rectangle{
- id:configBackground
- color: "white"
- width:parent.width
- height:Math.max(90*mm,root.height-12*mm)
- property var users:[]
- property bool registeredUser: true
- property var userdata: ({})
-
- function setServericon(server){
- try {Helperjs.friendicaWebRequest(server+"/api/statusnet/config",configBackground, function (obj){
- var serverdata = JSON.parse(obj);
- servericon.visible=true;
- servericon.source=serverdata.site.logo})} catch(e){print(e)}
- }
-
- BlueButton{
- id:userButton
- text:qsTr("User")
- y:mm
- width: root.width/2
- onClicked:{
- var useritems="";
- for (var i=0;i-1){
- Helperjs.showMessage(qsTr("Error"),qsTr("Nicknames containing @ symbol currently not supported"),configBackground)
- }
- // Helperjs.friendicaWebRequest(servername.text+'/api/users/show?screen_name='+username.text,configBackground,function(obj){
- // var screennametest=JSON.parse(obj);
- // if (screennametest.hasOwnProperty('status')){
- // Helperjs.showMessage(qsTr("Error"),qsTr("Nickname not registered at given server!"),configBackground);
- // configBackground.registeredUser=false;
- // }else{configBackground.registeredUser=true}
- // });
- // }
- }
- }
- }
- BlueButton {
- x: root.width-9*mm; y: 23.5*mm; width:7*mm
- text: "\uf234"
- onClicked: {
- configStack.push({item:"qrc:/qml/configqml/RegisterPage.qml",properties:{url:servername.text+"/register?nickname="+username.getText(0,username.length)}})
- }
- }
-
- Rectangle{
- color: "light grey"
- x: 4*mm; y: 33.5*mm; width: root.width-6*mm; height: 5*mm;
- TextInput {
- id: password
- anchors.fill: parent
- font.pixelSize:3*mm
- selectByMouse: true
- echoMode: TextInput.PasswordEchoOnEdit
- }
- }
-
- Rectangle{color: "light grey"; x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;}
- Flickable {
- id: imagestoreFlickable
- x: 4*mm; y: 43.5*mm; width: root.width-14*mm; height: 5*mm;
- clip: true
- TextInput {
- id: imagestore
- width: imagestoreFlickable.width
- height: imagestoreFlickable.height
- font.pixelSize:3*mm
- wrapMode: TextEdit.NoWrap
- onCursorRectangleChanged: Layoutjs.ensureVisibility(cursorRectangle,imagestoreFlickable)
- }
- }
-
- FileDialog {
- id: imagestoreDialog
- title: "Please choose a directory"
- folder: shortcuts.pictures
- selectFolder: true
- onAccepted: {
- var imagestoreString=imagestoreDialog.folder.toString();
- imagestoreString=imagestoreString.replace(/^(file:\/{2})/,"")+"/"
- imagestore.text=imagestoreString
- }
- }
-
- BlueButton {
- x: root.width-9*mm; y: 43.5*mm; width: 7*mm; height: 5*mm;
- text: "..."
- onClicked:
- {imagestoreDialog.open()}
- }
-
-
- Slider{ id: maxNews
- x:19*mm; y: 53.5*mm;width: root.width/2;height:5*mm
- minimumValue: 0;maximumValue:2000; stepSize: 100
- }
-
-
- Rectangle{color: "light grey"; x: 4*mm; y: 53.5*mm; width: 9*mm; height: 5*mm;
- TextEdit{id:maxNewsText;
- anchors.fill: parent
- font.pixelSize:3*mm
- verticalAlignment:TextEdit.AlignRight
- text:maxNews.value
- focus: true
- selectByMouse: true
- }
- }
-
- Rectangle{
- x: 4*mm; y: 63.5*mm; width: newsTypeField.contentWidth+2*mm; height: 5*mm;
- color:"light grey"
- Text{
- id: newsTypeField
- anchors.fill: parent
- font.pixelSize:3*mm
- text:"Conversations"
- }
- MouseArea{
- anchors.fill:parent
- onClicked:newstypemenu.popup()
- }
- }
- Slider{ id: messageIntervalSlider
- x:22*mm; y: 73.5*mm;width: root.width/2;height:5*mm
- minimumValue: 0;maximumValue:120; stepSize: 15
- }
- Rectangle{
- x: 4*mm; y: 73.5*mm; width: 9*mm; height: 5*mm;
- TextEdit{
- id: messageIntervalField
- anchors.fill: parent
- font.pixelSize:3*mm
- verticalAlignment:TextEdit.AlignRight
- text:messageIntervalSlider.value
- focus: true
- selectByMouse: true
- }
- }
- Text{x: 14*mm; y: 73.5*mm; width: 5*mm; height: 5*mm;
- font.pixelSize:3*mm
- text:qsTr("Min.")
- }
-
-// CheckBox{
-// id:showwebsiteCheckbox
-// x:35*mm;y:80*mm
-// onClicked:{
-// if (checked==true){
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","true")
-// root.globaloptions.showWebsiteForLinks="true"
-// }
-// else {
-// Service.updateglobaloptions(root.db,"showWebsiteForLinks","false")
-// root.globaloptions.showWebsiteForLinks="false"
-// }
-// }
-// }
-
- BlueButton {
- x: 4*mm; y: 83.5*mm
- text: qsTr("Confirm")
- onClicked:{
- var userconfig={server: servername.text, username: username.text, password:Qt.btoa(password.text), imagestore:imagestore.text,maxnews:maxNewsText.text,interval: messageIntervalField.text, newsViewType:newsTypeField.text};
- var errormessage="";
- if (servername.text==""){errormessage=qsTr("No server given! ")}
- else if (username.text==""){errormessage+=qsTr("No nickname given! ")}
- else if ((configBackground.registeredUser==false)){errormessage+=qsTr("Nickname not registered at given server! ")}
- else if (password.text=="") {errormessage+=qsTr("No password given! ")}
- else if (imagestore.text=="") {errormessage+=qsTr("No image directory given!")}
- else if (maxNewsText.text=="") {errormessage+=qsTr("No maximum news number given!")}
- else {errormessage=""}
- if (errormessage=="") {
- Helperjs.friendicaRequest(userconfig,"/api/account/verify_credentials?skip_status=true",root,function(obj){
- var credentials=JSON.parse(obj);
- if (credentials.hasOwnProperty('status')){
- Helperjs.showMessage(qsTr("Error"),qsTr("Wrong password!"),root)
- }
- else{
- filesystem.Directory=userconfig.imagestore;
- filesystem.makeDir("contacts");
- filesystem.makeDir("albums");
- Service.storeConfig(db,userconfig);
- Service.readConfig(db,function(userconfig){
- Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- });
- configBackground.users=storedUsers});
- userButton.color="black"
- //reset values
- root.login=userconfig;
- root.news=[];
- },"isActive",0);
- Service.requestProfile(userconfig,db,root,function(nc){root.newContacts=nc});
- if(osSettings.osType=="Android" && userconfig.timerInterval !=0){
- alarm.setAlarm(userconfig.timerInterval);
- }
- Helperjs.showMessage(qsTr("Success"),qsTr("Name")+": "+credentials.name+"\nScreen Name: "+credentials.screen_name,root)
- }
- });
-
- }
- else {Helperjs.showMessage(qsTr("Error"), errormessage,root)}
- }}
-
-
-
- BlueButton {
- x: root.width/2+2*mm; y: mm; width: 5*mm; height: 5*mm;
- text: "-"
- onClicked:{
- var userconfig={server: servername.text, username: username.text, password: Qt.btoa(password.text)};
- Service.deleteConfig(db,userconfig,function(){
- filesystem.Directory=imagestore.text+"contacts";
- filesystem.rmDir();
- filesystem.Directory=imagestore.text+"albums";
- filesystem.rmDir();
- configBackground.registeredUser=true;
- servername.text="https://...";
- servericon.visible=false;
- servericon.source="";
- username.text="";
- password.text="";
- imagestore.text="";
- maxNews.value=0;
- newsTypeField.text="Conversations";
- messageIntervalSlider.value=30;
- userButton.text=qsTr("User");
- Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- })
- configBackground.users=storedUsers;})
- })
- }}
-
- BlueButton {
- x: root.width/2+8*mm; y: mm; width: 5*mm; height: 5*mm;
- text: "+"
- onClicked:{
- configBackground.registeredUser=true;
- servername.text="https://..."
- servericon.visible=false;
- servericon.source="";
- username.text=""
- password.text=""
- imagestore.text=""
- maxNews.value=0
- newsTypeField.text="Conversations"
- messageIntervalSlider.value=30
- userButton.text=qsTr("User")
- }
- }
-
- BlueButton {
- x: root.width/2+14*mm; y: mm; width: 5*mm; height: 5*mm;
- text: "?"
- onClicked:{
- configStack.push({item:"qrc:/qml/configqml/InfoBox.qml"});
- }
- }
-
- Menu {
- id:newstypemenu
- MenuItem {
- text: qsTr("Timeline")
- onTriggered: {newsTypeField.text="Timeline"}
- }
- MenuItem {
- text: qsTr("Conversations")
- onTriggered: {newsTypeField.text="Conversations"}
- }
- }
-
- Component.onCompleted: {
- try{Helperjs.readData(db,"config","",function(storedUsers){
- storedUsers.sort(function(obj1, obj2) {
- return obj1.isActive - obj2.isActive;
- })
- configBackground.users=storedUsers;
- Service.readConfig(db,function(obj){
- userButton.text=obj.username;
- servername.text=obj.server;
- configBackground.setServericon(obj.server);
- username.text= obj.username;
- password.text=Qt.atob(obj.password);
- imagestore.text=obj.imagestore;
- maxNews.value=obj.maxnews;
- newsTypeField.text=obj.newsViewType;
- messageIntervalSlider.value=obj.timerInterval;
- if( obj.isActive==0){userButton.fontColor='black'} else {userButton.fontColor='grey'}},"isActive",0
- )
- })
-// Service.readGlobaloptions(db,function(go){
-// if (root.globaloptions.showWebsiteForLinks!="false"){showwebsiteCheckbox.checked=true}
-// })
-
- }
- catch (e){print(e)
- Helperjs.friendicaWebRequest("https://dir.friendica.social/servers/surprise",configBackground,function(html){
- var bpos=html.indexOf("baseurl");
- var baseurl=html.substring(html.indexOf("http",bpos),html.indexOf('"',html.indexOf("http",bpos)));
- servername.text=baseurl
- })}
- }
-}
-}
-}
diff --git a/source-linux/qml/configqml/InfoBox.qml b/source-linux/qml/configqml/InfoBox.qml
index dc463d4..0402662 100644
--- a/source-linux/qml/configqml/InfoBox.qml
+++ b/source-linux/qml/configqml/InfoBox.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.0
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/qml/genericqml"
Rectangle{
@@ -43,7 +43,7 @@ Rectangle{
textFormat: Text.RichText
width: root.width-mm
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
- text: "Friendiqa v0.5.2 Licensed under GPL 3 with the exception of OpenSSL "+
+ text: "Friendiqa v0.5.3 Licensed under GPL 3 with the exception of OpenSSL "+
"Website https://friendiqa.ma-nic.de "+
"Sourcecode: https://git.friendi.ca/LubuWest/Friendiqa "+
"Privacy Policy: http://git.friendi.ca/lubuwest/Friendiqa/src/branch/master/PrivacyPolicy.md "+
diff --git a/source-linux/qml/configqml/OSSettingsAndroid.qml b/source-linux/qml/configqml/OSSettingsAndroid.qml
index 8dd7ec5..4ef254d 100644
--- a/source-linux/qml/configqml/OSSettingsAndroid.qml
+++ b/source-linux/qml/configqml/OSSettingsAndroid.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/qml/configqml/OSSettingsLinux.qml b/source-linux/qml/configqml/OSSettingsLinux.qml
index f2bd73c..20440a7 100644
--- a/source-linux/qml/configqml/OSSettingsLinux.qml
+++ b/source-linux/qml/configqml/OSSettingsLinux.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -29,10 +29,11 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
+import QtQuick.Window 2.0
import QtQuick 2.0
QtObject{
- property real appWidth: 500
- property real appHeight: 500
+ property real appWidth: Screen.desktopAvailableWidth/3
+ property real appHeight: Screen.desktopAvailableHeight/3*2
property int backKey: Qt.Key_Escape
property string osType: "Linux"
//property string attachImageDir:filesystem.homePath+"/Pictures/"
diff --git a/source-linux/qml/configqml/RegisterPage.qml b/source-linux/qml/configqml/RegisterPage.qml
index 097e2bc..3dcbc8d 100644
--- a/source-linux/qml/configqml/RegisterPage.qml
+++ b/source-linux/qml/configqml/RegisterPage.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.9
-import QtQuick.Controls 2.5
+import QtQuick.Controls 2.12
import QtWebView 1.1
import "qrc:/qml/genericqml"
diff --git a/source-linux/qml/configqml/SyncComponent.qml b/source-linux/qml/configqml/SyncComponent.qml
index 05be915..b8cd30c 100644
--- a/source-linux/qml/configqml/SyncComponent.qml
+++ b/source-linux/qml/configqml/SyncComponent.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
import QtQuick 2.11
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/qml/configqml"
import "qrc:/js/service.js" as Service
diff --git a/source-linux/qml/configqml/SyncConfig.qml b/source-linux/qml/configqml/SyncConfig.qml
index 369cf56..ef7ebf6 100644
--- a/source-linux/qml/configqml/SyncConfig.qml
+++ b/source-linux/qml/configqml/SyncConfig.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,14 +30,17 @@
// along with this program. If not, see .
import QtQuick 2.11
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/qml/configqml"
+import "qrc:/qml/genericqml"
import "qrc:/js/service.js" as Service
Rectangle{
color:"white"
width:root.width
- height:root.height
+ height: root.height
+
+ //height:root.height
Text {
text: qsTr("Sync Interval (0=None)")
font.pixelSize:3*mm
@@ -47,7 +50,7 @@ Rectangle{
Slider{ id: messageIntervalSlider
x:22*mm; y: 13.5*mm;width: root.width/2;height:5*mm
- value: globaloptions.syncinterval
+ value: globaloptions.hasOwnProperty("syncinterval")?globaloptions.syncinterval:0
from: 0;to:120; stepSize: 15
}
Rectangle{
@@ -65,6 +68,7 @@ Rectangle{
if(osSettings.osType=="Android"){
alarm.setAlarm(text);
} else if(osSettings.osType=="Linux" && text !=0){
+ root.updateSyncinterval(parseInt(text))
}
}
}
@@ -74,18 +78,24 @@ Rectangle{
text:qsTr("Min.")
}
- Column{
- y:22*mm
- width: parent.width
- spacing:mm
- //anchors.fill: parent
- SyncComponent{adapter:"Timeline"}
- SyncComponent{adapter:"Replies"}
- SyncComponent{ adapter:"DirectMessages"}
- SyncComponent{ adapter:"Notifications"}
+ ScrollView{
+ width: root.width
+ height: root.height - 25*mm;y:22*mm
+ clip:true
+ Column{
+ //height: implicitHeight
+ width: parent.width
+ spacing:mm
+ //anchors.fill: parent
+ SyncComponent{adapter:"Timeline"}
+ SyncComponent{adapter:"Replies"}
+ SyncComponent{ adapter:"DirectMessages"}
+ SyncComponent{ adapter:"Notifications"}
+ SyncComponent{ adapter: "Events"}
+ }
}
- Button{
+ MButton{
id:closeButton
anchors.top: parent.top
anchors.topMargin: 1*mm
diff --git a/source-linux/qml/contactqml/ContactComponent.qml b/source-linux/qml/contactqml/ContactComponent.qml
deleted file mode 100644
index 3ddcb19..0000000
--- a/source-linux/qml/contactqml/ContactComponent.qml
+++ /dev/null
@@ -1,92 +0,0 @@
-// This file is part of Friendiqa
-// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// In addition, as a special exception, the copyright holders give
-// permission to link the code of portions of this program with the
-// OpenSSL library under certain conditions as described in each
-// individual source file, and distribute linked combinations including
-// the two.
-//
-// You must obey the GNU General Public License in all respects for all
-// of the code used other than OpenSSL. If you modify file(s) with this
-// exception, you may extend this exception to your version of the
-// file(s), but you are not obligated to do so. If you do not wish to do
-// so, delete this exception statement from your version. If you delete
-// this exception statement from all source files in the program, then
-// also delete it here.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-import QtQuick 2.0
-import QtQuick.Controls 2.4
-import "qrc:/qml/genericqml"
-
-Item {
- id: contactComponent
- height: 8*mm
- width: parent.width
- property var createdAtDate: new Date(contact.created_at)
- property string connectUrl: (contact.network!=="dfrn")||(contact.isFriend==1)?"":( ""+qsTr("Connect")+" ")
-
- Rectangle {
- id: wrapper
- width:parent.width
- height: 8*mm
- border.color: "grey"
- color:"white"
- Image {
- id: photoImage
- x:0.5*mm
- y:0.5*mm
- width: 7*mm
- height:7*mm
- source:((contact.profile_image!="") && (typeof(contact.profile_image)=="string"))? "file://"+contact.profile_image : contact.profile_image_url
- onStatusChanged: {if (photoImage.status == Image.Error) {source="qrc:/images/defaultcontact.jpg"}}
- }
-
- Column{
- width: wrapper.width-8*mm
- anchors.left: photoImage.right
- anchors.margins: 1*mm
- spacing: mm
- Label {
- id: namelabel
- width: wrapper.width-4
- height: 3*mm
- text: contact.name
- elide:Text.ElideRight
- color: "#303030"
- font.pixelSize: 3*mm
- }
- Label {
- id: screennamelabel
- width: wrapper.width-8*mm
- height: 2.5*mm
- text: "@"+contact.screen_name
- elide:Text.ElideRight
- color: "#303030"
- font.pixelSize: 2.5*mm
- }
- }
- MouseArea{
- anchors.fill: parent
- onClicked:{
- rootstack.currentIndex=0;
- bar.currentIndex=0;
- root.contactdetailsSignal(contact)
- }
- }
- }
-}
diff --git a/source-linux/qml/contactqml/ContactDetailsComponent.qml b/source-linux/qml/contactqml/ContactDetailsComponent.qml
index cd5112c..2b21682 100644
--- a/source-linux/qml/contactqml/ContactDetailsComponent.qml
+++ b/source-linux/qml/contactqml/ContactDetailsComponent.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.0
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/qml/genericqml"
Item {
diff --git a/source-linux/qml/contactqml/Contactlist.qml b/source-linux/qml/contactqml/Contactlist.qml
index 67564ca..045930b 100644
--- a/source-linux/qml/contactqml/Contactlist.qml
+++ b/source-linux/qml/contactqml/Contactlist.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
// List of people
import QtQuick 2.0
-import QtQuick.Controls 2.5
+import QtQuick.Controls 2.12
import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml"
diff --git a/source-linux/qml/contactqml/FriendsTab.qml b/source-linux/qml/contactqml/FriendsTab.qml
index a054010..87eb392 100644
--- a/source-linux/qml/contactqml/FriendsTab.qml
+++ b/source-linux/qml/contactqml/FriendsTab.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.11
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
//import QtQuick.Controls.Styles 1.4
import QtQuick.Layouts 1.11
import QtQuick.LocalStorage 2.0
diff --git a/source-linux/qml/contactqml/GroupComponent.qml b/source-linux/qml/contactqml/GroupComponent.qml
index 6659f01..0097d2f 100644
--- a/source-linux/qml/contactqml/GroupComponent.qml
+++ b/source-linux/qml/contactqml/GroupComponent.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.11
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/news.js" as Newsjs
import "qrc:/qml/genericqml"
diff --git a/source-linux/qml/contactqml/ProfileComponent.qml b/source-linux/qml/contactqml/ProfileComponent.qml
index a2b5b09..10ef868 100644
--- a/source-linux/qml/contactqml/ProfileComponent.qml
+++ b/source-linux/qml/contactqml/ProfileComponent.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.0
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/qml/genericqml"
import "qrc:/js/service.js" as Service
diff --git a/source-linux/qml/friendiqa.qml b/source-linux/qml/friendiqa.qml
index a42f4bf..6016358 100644
--- a/source-linux/qml/friendiqa.qml
+++ b/source-linux/qml/friendiqa.qml
@@ -45,7 +45,7 @@ StackView{
height:osSettings.appHeight
property var db: ["Friendiqa", "1.0", "Stores Friendica data", 100000000]
property var login: Service.readActiveConfig(db)
- property var globaloptions: ({}) //Service.readGlobaloptions(db)
+ property var globaloptions: Service.readGO(db)
property var contactlist: []
property real mm: osSettings.osType=="Android"?Screen.pixelDensity:Screen.pixelDensity*1.5
signal messageSignal(var friend)
@@ -59,6 +59,7 @@ StackView{
signal uploadSignal(var urls)
signal sendtextSignal(var intenttext)
signal changeimage(var method, var type, var id)
+ signal updateSyncinterval(int interval)
property var news:[]
property var newContacts:[]
//property string contactLoadType: ""
@@ -67,7 +68,7 @@ StackView{
onLoginChanged:{
if(login==""){root.push("qrc:/qml/configqml/AccountPage.qml")}
else{root.push(rootStackItem)
- newstab.newstabstatus=login.newsViewType;
+ if (login.newsViewType!="" || login.newsViewType!=null){newstab.newstabstatus=login.newsViewType;}
Newsjs.getCurrentContacts(login,db,function(contacts){
contactlist=contacts})}
}
@@ -105,22 +106,20 @@ StackView{
FontLoader{id: fontAwesome; source: "qrc:/images/fontawesome-webfont.ttf"}
- Keys.onReleased: {print("Backkey"+newstab.conversation.length+" "+root.depth)
+ Keys.onReleased: {//print(event.key + "Backkey"+newstab.conversation.length+" "+root.depth)
if (event.key === osSettings.backKey) {
if (rootstack.currentIndex==0){
newstab.active=true;
- print(newstab.newstabstatus)
- if (newstab.newstabstatus!=login.newsViewType){
- newstab.newstabstatus=login.newsViewType;
- if(login.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
+ if (newstab.newstabstatus!=globaloptions.newsViewType){
+ newstab.newstabstatus=globaloptions.newsViewType;
+ if(globaloptions.newsViewType=="Timeline"){Newsjs.newsfromdb(db,login.username,0,function(dbnews){
newsSignal(dbnews)
})}
else{
Newsjs.chatsfromdb(db,login.username,function(dbnews){
newsSignal(dbnews)
})}
- print(newstab.conversation.length);
- }
+ }
else if (newstab.conversation.length>0){newstab.conversation=[]}
else if (root.depth>1){root.pop()}
@@ -287,7 +286,6 @@ StackView{
}
Label{
-
text: "\uf08b " +qsTr("Quit")
font.pixelSize: 4*mm
width: parent.width
@@ -305,9 +303,6 @@ StackView{
}
}
-
-
-
Item{
id:rootStackItem
width:parent.width
@@ -395,12 +390,12 @@ StackView{
}
Component.onCompleted: {
forceActiveFocus();
- Service.readGlobaloptions(db,function(go){globaloptions=go})
//print(xhr.networktype());
if(osSettings.osType=="Android"){
var component = Qt.createComponent("qrc:/qml/genericqml/IntentReceiver.qml");
var IntentReceiverQml = component.createObject(root);
- } else if (osSettings.osType=="Linux"){
+ }
+ else if (osSettings.osType=="Linux"){
var component = Qt.createComponent("qrc:/qml/genericqml/LinuxSync.qml");
var LinuxSyncQml = component.createObject(root);
}
diff --git a/source-linux/qml/genericqml/BlueButton.qml b/source-linux/qml/genericqml/BlueButton.qml
index 997db9b..96bd887 100644
--- a/source-linux/qml/genericqml/BlueButton.qml
+++ b/source-linux/qml/genericqml/BlueButton.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/qml/genericqml/ContactComponent.qml b/source-linux/qml/genericqml/ContactComponent.qml
index c2d687e..63f6656 100644
--- a/source-linux/qml/genericqml/ContactComponent.qml
+++ b/source-linux/qml/genericqml/ContactComponent.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.0
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/qml/genericqml"
Item {
diff --git a/source-linux/qml/genericqml/ImagePickerLinux.qml b/source-linux/qml/genericqml/ImagePickerLinux.qml
index cd3b182..ddb0045 100644
--- a/source-linux/qml/genericqml/ImagePickerLinux.qml
+++ b/source-linux/qml/genericqml/ImagePickerLinux.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.0
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import Qt.labs.folderlistmodel 2.1
import "qrc:/js/service.js" as Service
import "qrc:/js/helper.js" as Helperjs
diff --git a/source-linux/qml/genericqml/LinuxSync.qml b/source-linux/qml/genericqml/LinuxSync.qml
index 0e6d84d..9abc6e9 100644
--- a/source-linux/qml/genericqml/LinuxSync.qml
+++ b/source-linux/qml/genericqml/LinuxSync.qml
@@ -12,11 +12,17 @@ Item {
}
}
+ function startSyncTimer(interval){
+ syncTimer.interval=interval*60000;
+ //print("synctimer interval "+syncTimer.interval)
+ syncTimer.start()
+ }
+
Component.onCompleted: {
if (root.globaloptions.hasOwnProperty("syncinterval") && root.globaloptions.syncinterval !=null && root.globaloptions.syncinterval !=0){
- syncTimer.interval=root.globaloptions.syncinterval*60000;
- syncTimer.start()
+ startSyncTimer(root.globaloptions.syncinterval)
}
+ root.updateSyncinterval.connect(startSyncTimer)
}
}
diff --git a/source-linux/qml/genericqml/MButton.qml b/source-linux/qml/genericqml/MButton.qml
index 5e87376..b6cb841 100644
--- a/source-linux/qml/genericqml/MButton.qml
+++ b/source-linux/qml/genericqml/MButton.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -29,12 +29,13 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
import QtQuick 2.6
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
Button{
id: mButton
width: Math.max(text.width+2*mm,8*mm)
+ //radius: mm
height: 6*mm
//color: Material.grey
font.pixelSize: 3*mm
- background: Rectangle{color:"#F8F8F8"}
+ background: Rectangle{color:"#F8F8F8";radius: 0.5*mm}
}
diff --git a/source-linux/qml/genericqml/PermissionDialog.qml b/source-linux/qml/genericqml/PermissionDialog.qml
index 8faaad8..f016c67 100644
--- a/source-linux/qml/genericqml/PermissionDialog.qml
+++ b/source-linux/qml/genericqml/PermissionDialog.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/qml/genericqml/Search.qml b/source-linux/qml/genericqml/Search.qml
index 835e7be..8a05021 100644
--- a/source-linux/qml/genericqml/Search.qml
+++ b/source-linux/qml/genericqml/Search.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.7
-import QtQuick.Controls 1.2
+import QtQuick.Controls 2.12
import "qrc:/qml/genericqml"
//import "qrc:/js/news.js" as Newsjs
//import "qrc:/js/helper.js" as Helperjs
diff --git a/source-linux/qml/newsqml/ContactPage.qml b/source-linux/qml/newsqml/ContactPage.qml
index e3c7ead..b77abd2 100644
--- a/source-linux/qml/newsqml/ContactPage.qml
+++ b/source-linux/qml/newsqml/ContactPage.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
import QtQuick 2.0
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml"
diff --git a/source-linux/qml/newsqml/Conversation.qml b/source-linux/qml/newsqml/Conversation.qml
index 54c8cda..c0dbfc7 100644
--- a/source-linux/qml/newsqml/Conversation.qml
+++ b/source-linux/qml/newsqml/Conversation.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
// ConversationView with button
import QtQuick 2.0
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml"
import "qrc:/qml/newsqml"
@@ -83,7 +83,7 @@ Rectangle {
} else { conversationBusy.running=false;
conversationModel.clear();
var currentTime= new Date();
- var msg = {'currentTime': currentTime, 'model': conversationModel,'news':newstab.conversation, 'method':'refresh', 'options':globaloptions};
+ var msg = {'currentTime': currentTime, 'model': conversationModel,'news':newstab.conversation, 'method':'conversation', 'options':globaloptions};
conversationWorker.sendMessage(msg)
//conversationsymbol.color="grey"
}
@@ -186,7 +186,7 @@ Rectangle {
Component.onCompleted: {
if (news.length>0){var currentTime= new Date();
- var msg = {'currentTime': currentTime, 'model': conversationModel,'news':news,'appendnews':true, 'options':globaloptions};
+ var msg = {'currentTime': currentTime, 'model': conversationModel,'news':news,'method':'conversation', 'options':globaloptions};
conversationWorker.sendMessage(msg)}
}
}
diff --git a/source-linux/qml/newsqml/FriendicaActivities.qml b/source-linux/qml/newsqml/FriendicaActivities.qml
index 38ffe3b..f39063e 100644
--- a/source-linux/qml/newsqml/FriendicaActivities.qml
+++ b/source-linux/qml/newsqml/FriendicaActivities.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/qml/newsqml/Hashtag.qml b/source-linux/qml/newsqml/Hashtag.qml
index 2b1cf68..711a10c 100644
--- a/source-linux/qml/newsqml/Hashtag.qml
+++ b/source-linux/qml/newsqml/Hashtag.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/qml/newsqml/MessageSend.qml b/source-linux/qml/newsqml/MessageSend.qml
index ddaccfe..962796c 100644
--- a/source-linux/qml/newsqml/MessageSend.qml
+++ b/source-linux/qml/newsqml/MessageSend.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@
// message.qml
// message with buttons
import QtQuick 2.4
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
//import QtQuick.Dialogs 1.2
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/smiley.js" as Smileyjs
@@ -404,6 +404,7 @@ Rectangle{
visible:false //(bodyField.length>1)||(attachImageURLs.length>0)
spacing: mm
height: 12*mm
+ x: 0.5*mm
MButton{id:permButton
visible: (newsSwipeview.stacktype!=="DirectMessages")
height: 6*mm
@@ -473,7 +474,7 @@ Rectangle{
else{Helperjs.showMessage(qsTr("Error"),qsTr("No receiver supplied!"),root)}
}
if (conversation==true){
- newstab.newstabstatus=login.newsViewType; newsStack.pop(null)
+ newstab.newstabstatus=root.globaloptions.newsViewType; newsStack.pop(null)
}
}
}
diff --git a/source-linux/qml/newsqml/MoreComments.qml b/source-linux/qml/newsqml/MoreComments.qml
index 93ad6fb..d7b8d86 100644
--- a/source-linux/qml/newsqml/MoreComments.qml
+++ b/source-linux/qml/newsqml/MoreComments.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://github.com/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/qml/newsqml/NewsImage.qml b/source-linux/qml/newsqml/NewsImage.qml
index 3aa3d56..ebfe6f9 100644
--- a/source-linux/qml/newsqml/NewsImage.qml
+++ b/source-linux/qml/newsqml/NewsImage.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ AnimatedImage {id:gif;
'Rectangle{id:recfullscreen;color:"white";width:root.width;height:root.height;'+
'MouseArea {anchors.fill:parent;onClicked:{recfullscreen.destroy()}}'+
'AnimatedImage {id:giffullscreen;source: "'+gif.source+
- '";anchors.centerIn:parent; width:root.width;fillMode: Image.PreserveAspectFit; onStatusChanged: playing = (status == AnimatedImage.Ready);'+
+ '";anchors.centerIn:parent; width:root.width;height:root.height;fillMode: Image.PreserveAspectFit; onStatusChanged: playing = (status == AnimatedImage.Ready);'+
'}}',root,"Attachmentlarge")
}
}
diff --git a/source-linux/qml/newsqml/NewsLink.qml b/source-linux/qml/newsqml/NewsLink.qml
index 5d50ab7..78f1555 100644
--- a/source-linux/qml/newsqml/NewsLink.qml
+++ b/source-linux/qml/newsqml/NewsLink.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/qml/newsqml/NewsStack.qml b/source-linux/qml/newsqml/NewsStack.qml
index 0c1042a..a3dfe39 100644
--- a/source-linux/qml/newsqml/NewsStack.qml
+++ b/source-linux/qml/newsqml/NewsStack.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.11
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/service.js" as Service
@@ -162,7 +162,7 @@ StackView{
case "Replies":messagetype=3;break;
default:messagetype=0;
}
- if(newstab.newstabstatus=="Timeline"){print("lastnewsid "+lastnews_id);
+ if(newstab.newstabstatus=="Timeline"){//print("lastnewsid "+lastnews_id);
Newsjs.newsfromdb(root.db,root.login, messagetype,function(news){
var msg = {'currentTime': currentTime, 'model': newsModel,'news':news,'method':"", 'options':globaloptions};
newsWorker.sendMessage(msg);
@@ -187,7 +187,8 @@ StackView{
Connections{
target:xhr
onError:{
- Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);
+ if (data !="contactlist"){Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);}
+ newsBusy.running=false;
}
onSuccess:{
// downloadNotice.text=downloadNotice.text+ "\n xhr finished "+Date.now();
@@ -385,7 +386,6 @@ StackView{
}
Component.onCompleted: {
- //print(newsSwipeview.stacktype);
root.newstypeSignal.connect(newstypeHandling);
root.messageSignal.connect(onFriendsMessages);
root.contactdetailsSignal.connect(showContact);
@@ -396,7 +396,7 @@ StackView{
newsSwipeview.height=rootStackItem.height-12*mm;
newsSwipeview.y=5*mm;
rootStackItem.state=""
- login.hasOwnProperty("newsViewType")?newstab.newstabstatus=login.newsViewType:"Conversations"
+ root.globaloptions.hasOwnProperty("newsViewType")?newstab.newstabstatus=root.globaloptions.newsViewType:newstab.newstabstatus="Conversations";
var messagetype=0;
switch(newsSwipeview.stacktype){
case "Home":messagetype=0;break;
@@ -405,17 +405,17 @@ StackView{
case "Replies":messagetype=3;break;
default:messagetype=0;
}
- if((login.newsViewType=="Conversations")&&(newsSwipeview.stacktype=="Home")){
+ if((newstab.newstabstatus=="Conversations")&&(newsSwipeview.stacktype=="Home")){
Newsjs.chatsfromdb(db,login,messagetype,function(dbnews,lastid){
lastnewsid=lastid;
showNews(dbnews);
})
}
- else{Newsjs.newsfromdb(db,login,messagetype,function(dbnews,lastid){
+ else{
+ Newsjs.newsfromdb(db,login,messagetype,function(dbnews,lastid){
lastnewsid=lastid;
showNews(dbnews)
})}
- //}
}
}
}
diff --git a/source-linux/qml/newsqml/NewsTab.qml b/source-linux/qml/newsqml/NewsTab.qml
index 98b3010..ec7c8fa 100644
--- a/source-linux/qml/newsqml/NewsTab.qml
+++ b/source-linux/qml/newsqml/NewsTab.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.11
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
//import QtQuick.Controls.Styles 2.3
//import QtQuick.Dialogs 1.3
import "qrc:/qml/newsqml"
@@ -40,25 +40,7 @@ import "qrc:/js/service.js" as Service
Item {
-// Connections{
-// target:xhr
-// onError:{
-// Helperjs.showMessage(qsTr("Network Error"),"API:\n" +login.server+api+"\n Return: \n"+data,root);
-// }
-// onSuccess:{
-// if (api=="/api/statuses/friends_timeline"){
-// // downloadNotice.text=downloadNotice.text+ "\n xhr finished "+Date.now();
-// //Service.processNews(api,data);
-// if(login.newsViewType=="Timeline"){
-// Newsjs.newsfromdb(db,login.username,function(dbnews){showNews(dbnews)})}
-// else{Newsjs.chatsfromdb(db,login.username,function(dbnews){
-// showNews(dbnews);
-// })}
-// }
-// }
-// }
-
-
+ onHeightChanged: {newsSwipeview.height=height-6*mm}
Timer {id:contacttimer; interval: 50; running: false; repeat: false
onTriggered: {
// downloadNotice.text=downloadNotice.text + "\n contactTimer start "+ Date.now()
@@ -86,6 +68,50 @@ Item {
}
}
+ function getDateDiffString (seconds){
+ var timestring="";
+ if (seconds<60) {timestring= Math.round(seconds) + " " +qsTr("seconds");}
+ else if (seconds<90){timestring= Math.round(seconds/60) + " " +qsTr("minute") ;}
+ else if (seconds<3600){timestring= Math.round(seconds/60) + " " +qsTr("minutes");}
+ else if (seconds<5400){timestring= Math.round(seconds/3600) + " " +qsTr("hour");}
+ else if (seconds<86400){timestring= Math.round(seconds/3600) + " " +qsTr("hours");}
+ else if (seconds<129600){timestring= Math.round(seconds/86400) + " " +qsTr("day");}
+ else if (seconds<3888000){timestring= Math.round(seconds/86400) + " " +qsTr("days");}
+ else if (seconds<5832000){timestring= Math.round(seconds/3888000) + " " +qsTr("month");}
+ else if (seconds<69984000){timestring= Math.round(seconds/3888000) + " " +qsTr("months");}
+ else {timestring= Math.round(seconds/46656000) + " " + qsTr("years");}
+
+ return timestring;
+ }
+
+ function getActivitiesView(newsitemobject){
+ var likeText="";var dislikeText="";var attendyesText="";var attendnoText="";var attendmaybeText=""; var self={};
+ try{if (newsitemobject.messagetype==0&&newsitemobject.hasOwnProperty('friendica_activities')){
+ if (newsitemobject.friendica_activities.like.length>0){
+ if (newsitemobject.friendica_activities.like.length==1){likeText= newsitemobject.friendica_activities.like[0].name+" "+ qsTr("likes this.")}
+ else {likeText= newsitemobject.friendica_activities.like.length+" "+ qsTr("like this.")}
+ }
+ if (newsitemobject.friendica_activities.dislike.length>0){
+ if (newsitemobject.friendica_activities.dislike.length==1){dislikeText= newsitemobject.friendica_activities.dislike[0].name+" "+ qsTr("doesn't like this.")}
+ else {dislikeText= newsitemobject.friendica_activities.dislike.length+" "+ qsTr("don't like this.")}
+ }
+ if (newsitemobject.friendica_activities.attendyes.length>0){
+ if (newsitemobject.friendica_activities.attendyes.length==1){attendyesText=newsitemobject.friendica_activities.attendyes[0].name+" "+ qsTr("will attend.")}
+ else {attendyesText= newsitemobject.friendica_activities.attendyes.length+" "+ qsTr("persons will attend.")}
+ }
+ if (newsitemobject.friendica_activities.attendno.length>0){
+ if (newsitemobject.friendica_activities.attendno.length==1){attendnoText= newsitemobject.friendica_activities.attendno[0].name+" "+ qsTr("will not attend.")}
+ else {attendnoText= newsitemobject.friendica_activities.attendno.length+" "+ qsTr("persons will not attend.")}
+ }
+ if (newsitemobject.friendica_activities.attendmaybe.length>0){
+ if (newsitemobject.friendica_activities.attendmaybe.length==1){attendmaybeText= newsitemobject.friendica_activities.attendmaybe[0].name+" "+ qsTr("may attend.")}
+ else {attendmaybeText= newsitemobject.friendica_activities.attendmaybe.length+" "+ qsTr("persons may attend.")}
+ }
+ //var friendica_activities_self=JSON.parse(newsitemobject.friendica_activities_self);
+ }} catch(e){print("Activities "+e+ " "+JSON.stringify(newsitemobject.friendica_activities))}
+ return {likeText:likeText,dislikeText:dislikeText,attendyesText:attendyesText,attendnoText:attendnoText,attendmaybeText:attendmaybeText}
+ }
+
function onFriendsMessages(friend){
newstab.newstabstatus="Contact"
@@ -126,7 +152,6 @@ Item {
height: parent.height-6*mm
y: 5*mm
function onDirectMessage(friend){currentIndex=2}
-
transitions: Transition {
PropertyAnimation { properties: "height";
easing.type: Easing.InOutQuad
@@ -167,7 +192,7 @@ Item {
source:(newsSwipeview.currentIndex==3)? "qrc:/qml/newsqml/NewsStack.qml":""
//onLoaded: newsSwipeview.stacktype="Notifications"
}
- Component.onCompleted: {root.directmessageSignal.connect(onDirectMessage);}
+ Component.onCompleted: {root.directmessageSignal.connect(onDirectMessage)}
}
PageIndicator {
diff --git a/source-linux/qml/newsqml/NewsVideo.qml b/source-linux/qml/newsqml/NewsVideo.qml
index 9e0af3d..9b17cbc 100644
--- a/source-linux/qml/newsqml/NewsVideo.qml
+++ b/source-linux/qml/newsqml/NewsVideo.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/qml/newsqml/NewsVideoLarge.qml b/source-linux/qml/newsqml/NewsVideoLarge.qml
index c08d343..82a006b 100644
--- a/source-linux/qml/newsqml/NewsVideoLarge.qml
+++ b/source-linux/qml/newsqml/NewsVideoLarge.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@
import QtMultimedia 5.8
import QtQuick 2.9
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
//import QtQuick.Controls.Styles 1.4
Rectangle{
diff --git a/source-linux/qml/newsqml/NewsYplayer.qml b/source-linux/qml/newsqml/NewsYplayer.qml
index a5b9a90..1702de0 100644
--- a/source-linux/qml/newsqml/NewsYplayer.qml
+++ b/source-linux/qml/newsqml/NewsYplayer.qml
@@ -2,7 +2,7 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/source-linux/qml/newsqml/Newsitem.qml b/source-linux/qml/newsqml/Newsitem.qml
index b73bbdb..19ecee8 100644
--- a/source-linux/qml/newsqml/Newsitem.qml
+++ b/source-linux/qml/newsqml/Newsitem.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.0
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/js/news.js" as Newsjs
import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml"
@@ -42,8 +42,10 @@ Item {
property int itemindex: index
property var newsitemobject:model.newsitemobject
property string attending: ""
+ property var friendica_activities_view: getActivitiesView(model.newsitemobject)
+
onAttendingChanged: {attendLabel.visible=true;
- attendLabel.text= qsTr("attending: ")+ qsTr(attending)}
+ attendLabel.text= qsTr("attending")+": "+ qsTr(attending)}
signal replyto(string parent_id)
@@ -80,8 +82,8 @@ Item {
// }
Column {
id:toprow //newscolumn
- width: newsitem.width//-8*mm
-
+ width: newsitemobject.hasOwnProperty("indent")?newsitem.width-(newsitem.width/20 *newsitemobject.indent):newsitem.width//-8*mm
+ x:newsitemobject.hasOwnProperty("indent")?newsitem.width/20*newsitemobject.indent:0
Item{
height: Math.max(profileImage.height+mm,topFlow.implicitHeight+mm)
width: parent.width
@@ -128,7 +130,7 @@ Item {
color: "grey"
font.pixelSize: 1.5*mm
horizontalAlignment: Label.AlignRight
- text: newsitemobject.dateDiff
+ text: getDateDiffString(newsitemobject.dateDiff) + " " +qsTr("ago")
}
Label {
id:replytoLabel
@@ -166,7 +168,7 @@ Item {
// clip:true
// height: newsitemobject.nsfw?5*mm:Math.min(implicitHeight,3/4*root.height)
MouseArea{
- width: newsitem.width-8*mm-2
+ width: toprow.width-2
height: itemMessage.height
onPressAndHold: {
pushConversation();
@@ -178,7 +180,7 @@ Item {
textFormat: Text.RichText
font.family: "Noto Sans"
text: newsitemobject.statusnet_html//newsitemobject.attachmentList.length>0?newsitemobject.text : newsitemobject.statusnet_html
- width: newsitem.width-2
+ width: toprow.width-2
height:newsitemobject.nsfw?5*mm:Math.min(implicitHeight,3/4*root.height)
//height: implicitHeight
wrapMode: Text.Wrap
@@ -257,7 +259,7 @@ Item {
Label{color: "grey"
height:3.5*mm
font.pixelSize: 1.5*mm
- text: newsitemobject.friendica_activities_view.likeText
+ text: friendica_activities_view.likeText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.friendica_activities.like)}
@@ -266,7 +268,7 @@ Item {
Label{color: "grey"
height:3.5*mm
font.pixelSize: 1.5*mm
- text: newsitemobject.friendica_activities_view.dislikeText
+ text: friendica_activities_view.dislikeText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.friendica_activities.dislike)}
@@ -275,7 +277,7 @@ Item {
Label{color: "grey"
height:3.5*mm
font.pixelSize: 1.5*mm
- text: newsitemobject.friendica_activities_view.attendyesText
+ text: friendica_activities_view.attendyesText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendyes)}
@@ -283,7 +285,7 @@ Item {
Label{color: "grey"
height:3.5*mm
font.pixelSize: 1.5*mm
- text: newsitemobject.friendica_activities_view.attendnoText
+ text: friendica_activities_view.attendnoText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendno)}
@@ -292,7 +294,7 @@ Item {
Label{color: "grey"
height:3.5*mm
font.pixelSize: 1.5*mm
- text: newsitemobject.friendica_activities_view.attendmaybeText
+ text: friendica_activities_view.attendmaybeText
MouseArea{
anchors.fill: parent
onClicked: { showActivityContacts(newsitemobject.friendica_activities.attendmaybe)}
@@ -315,7 +317,7 @@ Item {
width:newsitem.width/5 //10*mm
height: parent.height
visible: ((newsitemobject.messagetype==0)||(newsitemobject.messagetype==3))? true:false
- checked:(newsitemobject.friendica_activities_view.self.liked==1)?true:false
+ checked:(model.newsitemobject.friendica_activities_view.self.liked==1)?true:false
indicator: Rectangle{
implicitWidth: newsitem.width/5 //10*mm
implicitHeight:4*mm
@@ -328,8 +330,14 @@ Item {
}
}
onClicked: {
- if(likeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"like",newsitemobject.id,root);dislikeCheckbox.checked=false; model.newsitemobject.friendica_activities_view.self.liked=0 }
- else{Newsjs.like(root.login,root.db,0,"like",newsitemobject.id,root); model.newsitemobject.friendica_activities_view.self.liked=1}}
+ if(likeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"like",newsitemobject.id,root);dislikeCheckbox.checked=false;
+ newsitemobject.friendica_activities_view.self.liked=1;
+ newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject});
+ }
+ else{Newsjs.like(root.login,root.db,0,"like",newsitemobject.id,root);
+ newsitemobject.friendica_activities_view.self.liked=0;
+ newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject});
+ }}
}
CheckBox{
id: dislikeCheckbox
@@ -349,8 +357,14 @@ Item {
}
}
onClicked: {
- if (dislikeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"dislike",newsitemobject.id,root);likeCheckbox.checked=false; model.newsitemobject.friendica_activities_view.self.disliked=0}
- else {Newsjs.like(root.login,root.db,0,"dislike",newsitemobject.id,root); model.newsitemobject.friendica_activities_view.self.disliked=1}}
+ if (dislikeCheckbox.checked==true){Newsjs.like(root.login,root.db,1,"dislike",newsitemobject.id,root);likeCheckbox.checked=false;
+ newsitemobject.friendica_activities_view.self.disliked=1;
+ newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject});
+ }
+ else {Newsjs.like(root.login,root.db,0,"dislike",newsitemobject.id,root);
+ newsitemobject.friendica_activities_view.self.disliked=0;
+ newsitem.ListView.view.model.set(index,{"newsitemobject":newsitemobject});
+ }}
}
CheckBox {
diff --git a/source-linux/qml/newsqml/PermissionDialog.qml b/source-linux/qml/newsqml/PermissionDialog.qml
index 23aa704..d9eaa67 100644
--- a/source-linux/qml/newsqml/PermissionDialog.qml
+++ b/source-linux/qml/newsqml/PermissionDialog.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.0
-import QtQuick.Controls 2.3
+import QtQuick.Controls 2.12
import "qrc:/js/service.js" as Service
import "qrc:/js/helper.js" as Helperjs
import "qrc:/qml/genericqml"
diff --git a/source-linux/qml/newsqml/SmileyDialog.qml b/source-linux/qml/newsqml/SmileyDialog.qml
index 6083755..cead53c 100644
--- a/source-linux/qml/newsqml/SmileyDialog.qml
+++ b/source-linux/qml/newsqml/SmileyDialog.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.11
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import QtQuick.Layouts 1.11
//import QtQuick.Controls.Styles 1.4
import "qrc:/js/smiley.js" as Smileyjs
diff --git a/source-linux/qml/photoqml/ImageUploadDialog.qml b/source-linux/qml/photoqml/ImageUploadDialog.qml
index 1bf85e1..56a5a56 100644
--- a/source-linux/qml/photoqml/ImageUploadDialog.qml
+++ b/source-linux/qml/photoqml/ImageUploadDialog.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.5
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import "qrc:/js/helper.js" as Helperjs
import "qrc:/js/image.js" as Imagejs
import "qrc:/qml/genericqml"
diff --git a/source-linux/qml/photoqml/PhotoComponent.qml b/source-linux/qml/photoqml/PhotoComponent.qml
index 0ba343a..dd3e95c 100644
--- a/source-linux/qml/photoqml/PhotoComponent.qml
+++ b/source-linux/qml/photoqml/PhotoComponent.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.5
-import QtQuick.Controls 1.2
+import QtQuick.Controls 2.12
import "qrc:/qml/photoqml"
Package {
@@ -84,7 +84,7 @@ Package {
MouseArea {
width: realImage.paintedWidth; height: realImage.paintedHeight; anchors.centerIn: realImage
onPressAndHold:{
- var menuString="import QtQuick 2.5;import QtQuick.Controls 1.4; "+
+ var menuString="import QtQuick 2.5;import QtQuick.Controls 2.12; "+
"Menu {MenuItem {text:qsTr('Delete on client and server'); onTriggered: {"+
"changeimage('delete','image','"+imageLocation+"');photoModel.remove(index)}}"+
"MenuItem {text:qsTr('Move to album'); onTriggered: {"+
diff --git a/source-linux/qml/photoqml/PhotoTab.qml b/source-linux/qml/photoqml/PhotoTab.qml
index 9de38af..023a7d1 100644
--- a/source-linux/qml/photoqml/PhotoTab.qml
+++ b/source-linux/qml/photoqml/PhotoTab.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.5
-import QtQuick.Controls 2.4
+import QtQuick.Controls 2.12
import QtQml.Models 2.1
import "qrc:/js/image.js" as Imagejs
import "qrc:/js/helper.js" as Helperjs
@@ -276,7 +276,7 @@ StackView{
}}}
}
- Rectangle { id: photoBackground; color: 'light grey'; width: parent.width; height: parent.height; opacity: 0; visible: opacity != 0.0 }
+ Rectangle { id: photoBackground; color: 'black'; width: parent.width; height: parent.height; opacity: 0; visible: opacity != 0.0 }
ListView { width: parent.width; height:parent.height; model: visualphotoModel.parts.browser; interactive: false }
diff --git a/source-linux/qml/photoqml/PhotogroupComponent.qml b/source-linux/qml/photoqml/PhotogroupComponent.qml
index 0c8ac73..eb948f4 100644
--- a/source-linux/qml/photoqml/PhotogroupComponent.qml
+++ b/source-linux/qml/photoqml/PhotogroupComponent.qml
@@ -1,6 +1,6 @@
// This file is part of Friendiqa
// https://git.friendi.ca/lubuwest/Friendiqa
-// Copyright (C) 2017 Marco R.
+// Copyright (C) 2020 Marco R.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
// along with this program. If not, see .
import QtQuick 2.5
-import QtQuick.Controls 1.3
+import QtQuick.Controls 2.12
import QtQml.Models 2.1
//import "qrc:/js/service.js" as Service
import "qrc:/js/image.js" as Imagejs
diff --git a/source-linux/translations/friendiqa-de.qm b/source-linux/translations/friendiqa-de.qm
index ae9f284..173db70 100644
Binary files a/source-linux/translations/friendiqa-de.qm and b/source-linux/translations/friendiqa-de.qm differ
diff --git a/source-linux/translations/friendiqa-de.ts b/source-linux/translations/friendiqa-de.ts
index 7b249e3..ecd9fd8 100644
--- a/source-linux/translations/friendiqa-de.ts
+++ b/source-linux/translations/friendiqa-de.ts
@@ -5,108 +5,105 @@
AccountPage
-
-
+
+ Name
-
+ Server
-
+ Kurzname
-
+ Passwort
-
+ Bildverz.
-
- Anzeige
+ Anzeige
-
-
-
+
+
+ Fehler
-
+ Kurznamen mit @ Zeichen werden derzeit nicht unterstützt.
-
+ Bestätigen
-
+ Kein Server angegeben!
-
+ Kein Kurzname angegeben!
-
+ Kein Passwort angegeben!
-
+ Kein Verzeichnis für Bilder angegeben!
-
+ Falsches Passwort!
-
+ Bestätigt
-
+ Name
-
- Chronologisch
+ Chronologisch
-
- Unterhaltungen
+ UnterhaltungenCalendarTab
-
+ Termine
-
+ Eigener Kalender
@@ -114,17 +111,35 @@
ConfigPage
-
+
+
+ Anzeige
+
+
+
+
+
+
+ Unterhaltungen
+
+
+
+
+
+ Chronologisch
+
+
+ Max. Nachr.
-
+ #nsfw minimieren?
-
+ Autom. Aktualisierung
@@ -310,6 +325,14 @@
Erstellt
+
+ EventList
+
+
+
+ Ort
+
+FriendsTab
@@ -403,20 +426,20 @@
Woran denkst du gerade?
-
-
+
+ Fehler
-
+ Nur ein Anhang derzeit unterstützt.
Lösche zuerst den anderen Anhang!
-
+ Kein Empfänger angegeben!
@@ -432,12 +455,12 @@
NewsStack
-
+ Netzwerk-Fehler
-
+ Mehr
@@ -496,26 +519,125 @@
Schliessen
+
+
+
+ Sekunden
+
+
+
+
+ Minute
+
+
+
+
+ Minuten
+
+
+
+
+ Stunde
+
+
+
+
+ Stunden
+
+
+
+
+ Tag
+
+
+
+
+ Tage
+
+
+
+
+ Monat
+
+
+
+
+ Monate
+
+
+
+
+ Jahre
+
+
+
+
+ mag das.
+
+
+
+
+ mögen das.
+
+
+
+
+ mag das nicht.
+
+
+
+
+ mögen das nicht.
+
+
+
+
+ nehmen teil.
+
+
+
+
+ Personen nehmen teil.
+
+
+
+
+ nimmt nicht teil.
+
+
+
+
+ Personen nehmen nicht teil.
+
+
+
+
+ nimmt vielleicht teil.
+
+
+
+
+ Personen nehmen vielleicht teil.
+ Newsitem
-
- Teilnahme
+ Teilnahme
-
+ Quelle:
-
+ Direktnachricht
-
+ Antwort an
@@ -524,57 +646,67 @@
Kommentare
-
+
+
+ partecipare
+
+
+
+
+ her
+
+
+ Teilnahme:
-
+ Antworten
-
+ Direktnachricht
-
+ Teilen
-
+ Erledigt!
-
+ Unterhaltung
-
+ Teilnahme
-
+ ja
-
+ vielleicht
-
+ nein
-
+ Löschen
@@ -883,12 +1015,12 @@
SyncConfig
-
+ Akt.-intervall (0=keine)
-
+ Min.
@@ -896,57 +1028,57 @@
friendiqa
-
+ Aktualisieren
-
+ Chronologisch
-
+ Unterhaltungen
-
+ Markierte News
-
+ Interaktionen
-
+ öff. Timeline
-
+ News Gruppe
-
+ Suche
-
+ Einstellungen
-
+ Konten
-
+ Schliessen
@@ -954,133 +1086,99 @@
newsworker
-
- mag das.
+ mag das.
-
- mögen das.
+ mögen das.
-
- mag das nicht.
+ mag das nicht.
+
+
+
+ mögen das nicht.
+
+
+
+ nehmen teil.
+
+
+
+ Personen nehmen teil.
+
+
+
+ nimmt nicht teil.
+
+
+
+ Personen nehmen nicht teil.
+
+
+
+ nimmt vielleicht teil.
+
+
+
+ Personen nehmen vielleicht teil.
-
- mögen das nicht.
-
-
-
-
- nehmen teil.
-
-
-
-
- Personen nehmen teil.
-
-
-
-
- nimmt nicht teil.
-
-
-
-
- Personen nehmen nicht teil.
-
-
-
-
- nimmt vielleicht teil.
-
-
-
-
- Personen nehmen vielleicht teil.
-
-
- ja
-
+ nein
-
+ vielleicht
-
- Sekunden
+ Sekunden
-
-
-
-
-
-
-
-
-
-
- her
+ her
-
- Minute
+ Minute
-
- Minuten
+ Minuten
-
- Stunde
+ Stunde
-
- Stunden
+ Stunden
-
- Tag
+ Tag
-
- Tage
+ Tage
-
- Monat
+ Monat
-
- Monate
-
-
-
-
-
+ Monate
@@ -1090,12 +1188,22 @@
Fehler
-
+
+
+ Änderungen
+
+
+
+
+ Die Einstellung der Ansichtsart von Nachrichten wurde von der Kontoseite auf die Konfigurationsseite verschoben.
+
+
+ Antwort-Array ungültig
-
+ Server-Antwort: Fehler
diff --git a/source-linux/translations/friendiqa-es.qm b/source-linux/translations/friendiqa-es.qm
index 2040a61..eed8306 100644
Binary files a/source-linux/translations/friendiqa-es.qm and b/source-linux/translations/friendiqa-es.qm differ
diff --git a/source-linux/translations/friendiqa-es.ts b/source-linux/translations/friendiqa-es.ts
index 9e3866b..cfd6cd4 100644
--- a/source-linux/translations/friendiqa-es.ts
+++ b/source-linux/translations/friendiqa-es.ts
@@ -5,108 +5,105 @@
AccountPage
-
-
+
+ Usuario
-
+ Servidor
-
+ Usuario
-
+ Contraseña
-
+ Dir. de imágenes
-
- Noticias como
+ Noticias como
-
-
-
+
+
+ Error
-
+ No se admiten los apodos que contienen el símbolo @ actualmente
-
+ Confirmar
-
+ ¡Servidor no encontrado!
-
+ ¡Usuario incorrecto!
-
+ ¡Contraseña incorrecta!
-
+ ¡No se ha encontrado el directorio de imágenes!
-
+ ¡Contraseña incorrecta!
-
+ éxito!
-
+ Nombre
-
- Cronología
+ Cronología
-
- Conversaciones
+ ConversacionesCalendarTab
-
+ Eventos
-
+ Calendario propio
@@ -114,17 +111,35 @@
ConfigPage
-
+
+
+ Noticias como
+
+
+
+
+
+
+ Conversaciones
+
+
+
+
+
+ Cronología
+
+
+ Nº Max. de noticias.
-
+ Ocultar #nsfw?
-
+ Sincronización
@@ -294,6 +309,14 @@
Creado en
+
+ EventList
+
+
+
+ Localización
+
+FriendsTab
@@ -376,20 +399,20 @@
¿Qué tienes en mente?
-
-
+
+ Error
-
+ Solo se admite adjuntar un solo archivo en este momento.
¡Elimine y deje un archivo adjunto!
-
+ No se ha suministrado ningún receptor!
@@ -405,12 +428,12 @@
NewsStack
-
+ Fallo de red
-
+ Mas
@@ -465,26 +488,125 @@
Salida
+
+
+
+ Segundos
+
+
+
+
+ Minuto
+
+
+
+
+ Minutos
+
+
+
+
+ Hora
+
+
+
+
+ Horas
+
+
+
+
+ Dia
+
+
+
+
+ Dias
+
+
+
+
+ Mes
+
+
+
+
+ Meses
+
+
+
+
+ Años
+
+
+
+
+ le gusta esto.
+
+
+
+
+ me gusta esto.
+
+
+
+
+ no de ése.
+
+
+
+
+ no me gusta.
+
+
+
+
+ asistirá.
+
+
+
+
+ Personas que asistirán.
+
+
+
+
+ no asistirá.
+
+
+
+
+ Personas que no asistirán.
+
+
+
+
+ Puede asistir.
+
+
+
+
+ Personas que pueden asistir.
+ Newsitem
-
- Asistiendo:
+ Asistiendo:
-
+ Fuente:
-
+ Mensaje directo
-
+ En respuesta a
@@ -493,57 +615,67 @@
comentarios
-
+
+
+ asistencia
+
+
+
+
+ hace
+
+
+ Asistiendo:
-
+ Respuesta
-
+ Mensaje directo
-
+ Volver a publicar
-
+ éxito!
-
+ Conversación
-
+ Asistiendo
-
+ si
-
+ quizás
-
+ no
-
+ Borrar
@@ -785,7 +917,7 @@
-
+ profile id
@@ -841,81 +973,81 @@
-
+ sync
-
+ notificarSyncConfig
-
+
-
+ Intervalo de sincr. (0=Ninguno)
-
+
-
+ min.friendiqa
-
+ Actualizar
-
+ Cronología
-
+ Conversaciones
-
+ Favoritos
-
+ Respuestas
-
+ Cronología pública
-
+ Grupos
-
+ Busca
-
+ Ajustes
-
+ Cuentas
-
+ Salida
@@ -923,133 +1055,103 @@
newsworker
-
- le gusta esto.
+ le gusta esto.
-
- me gusta esto.
+ me gusta esto.
-
- no de ése.
+ no de ése.
+
+
+
+ no me gusta.
+
+
+
+ asistirá.
+
+
+
+ Personas que asistirán.
+
+
+
+ no asistirá.
+
+
+
+ Personas que no asistirán..
+
+
+
+ Puede asistir.
+
+
+
+ Personas que pueden asistir.
-
- no me gusta.
-
-
-
-
- asistirá.
-
-
-
-
- Personas que asistirán.
-
-
-
-
- no asistirá.
-
-
-
-
- Personas que no asistirán..
-
-
-
-
- Puede asistir.
-
-
-
-
- Personas que pueden asistir.
-
-
- si
-
+ no
-
+ quizás
-
- Segundos
+ Segundos
-
-
-
-
-
-
-
-
-
-
- hace
+ hace
-
- Minuto
+ Minuto
-
- Minutos
+ Minutos
-
- Hora
+ Hora
-
- Horas
+ Horas
-
- Dia
+ Dia
-
- Dias
+ Dias
-
- Mes
+ Mes
-
- Meses
+ Meses
-
- Años
+ Años
@@ -1059,12 +1161,22 @@
Error
-
+
+
+
+
+
+
+
+ La configuración del tipo de vista de las noticias se ha movido de la página de la cuenta a la página de configuración.
+
+
+
-
+
diff --git a/source-linux/translations/friendiqa-it.qm b/source-linux/translations/friendiqa-it.qm
index 3ed5de3..eca6573 100644
Binary files a/source-linux/translations/friendiqa-it.qm and b/source-linux/translations/friendiqa-it.qm differ
diff --git a/source-linux/translations/friendiqa-it.ts b/source-linux/translations/friendiqa-it.ts
index a5731e7..4cd39a1 100644
--- a/source-linux/translations/friendiqa-it.ts
+++ b/source-linux/translations/friendiqa-it.ts
@@ -5,108 +5,105 @@
AccountPage
-
-
+
+ Utente
-
+ Server
-
+ Utente
-
+ Password
-
+ Directory immagini
-
- News come
+ News come
-
-
-
+
+
+ Errore
-
+ I soprannomi contenenti il simbolo @ attualmente non sono supportati
-
+ Conferma
-
+ Nessun server inserito!
-
+ Nessun utente inserito!
-
+ Nessuna password inserita!
-
+ Nessuna directory immagini inserita!
-
+ Password sbagliata!
-
+ Ha funzionato!
-
+ Nome
-
- Cronologia
+ Cronologia
-
- Conversazioni
+ ConversazioniCalendarTab
-
+ Eventi
-
+ Calendario
@@ -114,17 +111,35 @@
ConfigPage
-
+
+
+ News come
+
+
+
+
+
+
+ Conversazioni
+
+
+
+
+
+ Cronologia
+
+
+ Nº Max. di notizie
-
+ Nascondere #nsfw?
-
+ Sync
@@ -282,6 +297,14 @@
Creato il
+
+ EventList
+
+
+
+ Località
+
+FriendsTab
@@ -364,20 +387,20 @@
A cosa stai pensando?
-
-
+
+ Errore
-
+ Solo un allegato è attualmente supportato.
Rimuovere prima gli altri allegati!
-
+ Nessun ricevitore in dotazione!
@@ -393,12 +416,12 @@
NewsStack
-
+ Errore di rete
-
+ Ancora
@@ -441,26 +464,125 @@
Gruppi
+
+
+
+ secondi
+
+
+
+
+ minuti
+
+
+
+
+ minuti
+
+
+
+
+ ora
+
+
+
+
+ ore
+
+
+
+
+ giorno
+
+
+
+
+ giorni
+
+
+
+
+ mese
+
+
+
+
+ mesi
+
+
+
+
+ anni
+
+
+
+
+ mi piace.
+
+
+
+
+ mi piace.
+
+
+
+
+ non mi piace.
+
+
+
+
+ non mi piace.
+
+
+
+
+ attendere.
+
+
+
+
+ Persone che attendono.
+
+
+
+
+ non aspettare.
+
+
+
+
+ Persone che non aspettano.
+
+
+
+
+ puoi attendere.
+
+
+
+
+ Persone che possono attendere.
+ Newsitem
-
- attendere:
+ attendere:
-
+ Codice:
-
+ Messaggio diretto
-
+ In risposta a
@@ -469,57 +591,67 @@
commenti
-
+
+
+ partecipare
+
+
+
+
+ fa
+
+
+ Attendi:
-
+ Risposta
-
+ Messaggio diretto
-
+ Condividi
-
+ Ha funzionato!
-
+ Conversazione
-
+ Attendi
-
+ si
-
+ potrebbe
-
+ no
-
+ Cancella
@@ -828,12 +960,12 @@
SyncConfig
-
+ Intervallo (0=nessuno)
-
+ Min.
@@ -841,57 +973,57 @@
friendiqa
-
+ Aggiorna
-
+ Cronologia
-
+ Conversazioni
-
+ Favoriti
-
+ Risposte
-
+ Cronologia pubblica
-
+ Notizie del gruppo
-
+ Cerca
-
+ Configurazione
-
+ Conti
-
+ Chiudi
@@ -899,133 +1031,103 @@
newsworker
-
- mi piace.
+ mi piace.
-
- mi piace.
+ mi piace.
-
- non mi piace.
+ non mi piace.
+
+
+
+ non mi piace.
+
+
+
+ attendere.
+
+
+
+ Persone che attendono.
+
+
+
+ non aspettare.
+
+
+
+ Persone che non aspettano.
+
+
+
+ puoi attendere.
+
+
+
+ Persone che possono attendere.
-
- non mi piace.
-
-
-
-
- attendere.
-
-
-
-
- Persone che attendono.
-
-
-
-
- non aspettare.
-
-
-
-
- Persone che non aspettano.
-
-
-
-
- puoi attendere.
-
-
-
-
- Persone che possono attendere.
-
-
- si
-
+ no
-
+ potrebbe
-
- secondi
+ secondi
-
-
-
-
-
-
-
-
-
-
- fa
+ fa
-
- minuti
+ minuti
-
- minuti
+ minuti
-
- ora
+ ora
-
- ore
+ ore
-
- giorno
+ giorno
-
- giorni
+ giorni
-
- mese
+ mese
-
- mesi
+ mesi
-
- anni
+ anni
@@ -1035,12 +1137,22 @@
Errore
-
+
+
+ Changelog
+
+
+
+
+ L'impostazione del tipo di visualizzazione delle notizie è stata spostata dalla pagina del conto alla pagina di configurazione.
+
+
+
-
+