Commit 4c891cb6 authored by Dave Griffiths's avatar Dave Griffiths

social split into friendship

parent f98cd416
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<activity android:name="foam.symbai.IncomeActivity" android:configChanges="orientation"></activity> <activity android:name="foam.symbai.IncomeActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.GeneaologyActivity" android:configChanges="orientation"></activity> <activity android:name="foam.symbai.GeneaologyActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.SocialActivity" android:configChanges="orientation"></activity> <activity android:name="foam.symbai.SocialActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.FriendshipActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.AgreementActivity" android:configChanges="orientation"></activity> <activity android:name="foam.symbai.AgreementActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.IndividualChooserActivity" android:configChanges="orientation"></activity> <activity android:name="foam.symbai.IndividualChooserActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.SyncActivity" android:configChanges="orientation"></activity> <activity android:name="foam.symbai.SyncActivity" android:configChanges="orientation"></activity>
......
...@@ -217,8 +217,8 @@ ...@@ -217,8 +217,8 @@
(define (sync-files server-list) (define (sync-files server-list)
(let ((local-list (dir-list "/sdcard/symbai/files/"))) (let ((local-list (dir-list "/sdcard/symbai/files/")))
;; search for all local files in server list ;; search for all local files in server list
(dbg (crop (crop
(append (append
(foldl (foldl
(lambda (file r) (lambda (file r)
;; send files not present ;; send files not present
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
'() '()
server-list)) server-list))
;; restrict the number of uploads each time round ;; restrict the number of uploads each time round
2)))) 2)))
(define (start-sync-files) (define (start-sync-files)
(list (list
...@@ -253,7 +253,12 @@ ...@@ -253,7 +253,12 @@
(string-append "file-list") (string-append "file-list")
(string-append url "fn=file-list") (string-append url "fn=file-list")
(lambda (file-list) (lambda (file-list)
(dbg (sync-files file-list)))))) (let ((r (sync-files file-list)))
(when (not (null? r))
(set-current! 'upload 0)
(debug! "Found a mismatch with files on raspberry pi - fixing..."))
r)))))
;; spit all dirty entities to server ;; spit all dirty entities to server
(define (spit db table entities) (define (spit db table entities)
...@@ -370,6 +375,7 @@ ...@@ -370,6 +375,7 @@
(lambda (id) (lambda (id)
(when (not (in-list? id server-ids)) (when (not (in-list? id server-ids))
(msg "can't find " id " in server data, marking dirty") (msg "can't find " id " in server data, marking dirty")
(debug! "Have an entity here not on raspberry pi - marking for upload...")
;; mark those not present as dirty for next spit cycle ;; mark those not present as dirty for next spit cycle
(update-entity-dirtify db table id))) (update-entity-dirtify db table id)))
ids))) ids)))
......
This diff is collapsed.
(define i18n-text (define i18n-text
(list (list
(list 'test-num (list "1" "1" "1" "" )) (list 'test-num (list "1" "1" "1" "" ))
(list 'test-text (list "I am test text" "I am test text" "I am test text" "" )) (list 'test-text (list "I am test text" "I am test text" "I am test text" "" ))
(list 'one (list "one" "" )) (list 'one (list "one" "" ))
...@@ -111,6 +109,7 @@ ...@@ -111,6 +109,7 @@
(list 'details-button (list "Details" "" )) (list 'details-button (list "Details" "" ))
(list 'family-button (list "Family" "Family/Clan" )) (list 'family-button (list "Family" "Family/Clan" ))
(list 'migration-button (list "Migration" "" )) (list 'migration-button (list "Migration" "" ))
(list 'friendship-button (list "Friendship" ))
(list 'income-button (list "Income" "" )) (list 'income-button (list "Income" "" ))
(list 'geneaology-button (list "Geneaology" "" )) (list 'geneaology-button (list "Geneaology" "" ))
(list 'social-button (list "Social" "" )) (list 'social-button (list "Social" "" ))
...@@ -161,7 +160,7 @@ ...@@ -161,7 +160,7 @@
(list 'place-of-birth (list "Place of birth" "" )) (list 'place-of-birth (list "Place of birth" "" ))
(list 'num-residence-changes (list "Number of time place of residence changed since birth" "" )) (list 'num-residence-changes (list "Number of time place of residence changed since birth" "" ))
(list 'village-visits-month (list "Number of times you have visited another village in the last month" "" )) (list 'village-visits-month (list "Number of times you have visited another village in the last month" "" ))
(list 'village-visits-year (list "Number of times you have visited another village in the last year (i.e. betwen last summer and this summer)" "" )) (list 'village-visits-year (list "Number of times you have visited another village in the last year (i.e. between last summer and this summer)" "" ))
(list 'occupation (list "Occupation" "" )) (list 'occupation (list "Occupation" "" ))
(list 'occupation (list "Occupation" "" )) (list 'occupation (list "Occupation" "" ))
(list 'num-people-in-house (list "People living in house" "" )) (list 'num-people-in-house (list "People living in house" "" ))
...@@ -209,7 +208,8 @@ ...@@ -209,7 +208,8 @@
(list 'social-three (list "Three" "" )) (list 'social-three (list "Three" "" ))
(list 'social-four (list "Four" "" )) (list 'social-four (list "Four" "" ))
(list 'social-five (list "Five" "" )) (list 'social-five (list "Five" "" ))
(list 'social-relationship (list "Relationship" "" )) (list 'social-nickname (list "Name" ))
(list 'social-relationship (list "Relation" "" ))
(list 'social-residence (list "Residence" "" )) (list 'social-residence (list "Residence" "" ))
(list 'social-strength (list "Strength" "" )) (list 'social-strength (list "Strength" "" ))
(list 'mother (list "Mother" "" )) (list 'mother (list "Mother" "" ))
......
...@@ -72,6 +72,7 @@ public class starwisp extends StarwispActivity ...@@ -72,6 +72,7 @@ public class starwisp extends StarwispActivity
ActivityManager.RegisterActivity("income",IncomeActivity.class); ActivityManager.RegisterActivity("income",IncomeActivity.class);
ActivityManager.RegisterActivity("geneaology",GeneaologyActivity.class); ActivityManager.RegisterActivity("geneaology",GeneaologyActivity.class);
ActivityManager.RegisterActivity("social",SocialActivity.class); ActivityManager.RegisterActivity("social",SocialActivity.class);
ActivityManager.RegisterActivity("friendship",FriendshipActivity.class);
ActivityManager.RegisterActivity("individual-chooser",IndividualChooserActivity.class); ActivityManager.RegisterActivity("individual-chooser",IndividualChooserActivity.class);
ActivityManager.RegisterActivity("sync",SyncActivity.class); ActivityManager.RegisterActivity("sync",SyncActivity.class);
ActivityManager.RegisterActivity("crop",CropActivity.class); ActivityManager.RegisterActivity("crop",CropActivity.class);
......
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
"details-button"," Details"," ",, "details-button"," Details"," ",,
"family-button"," Family","Family/Clan",, "family-button"," Family","Family/Clan",,
"migration-button"," Migration"," ",, "migration-button"," Migration"," ",,
"friendship-button","Friendship",,,
"income-button"," Income"," ",, "income-button"," Income"," ",,
"geneaology-button"," Geneaology"," ",, "geneaology-button"," Geneaology"," ",,
"social-button"," Social"," ",, "social-button"," Social"," ",,
...@@ -205,7 +206,8 @@ ...@@ -205,7 +206,8 @@
"social-three"," Three"," ",, "social-three"," Three"," ",,
"social-four"," Four"," ",, "social-four"," Four"," ",,
"social-five"," Five"," ",, "social-five"," Five"," ",,
"social-relationship"," Relationship"," ",, "social-nickname","Name",,,
"social-relationship"," Relation"," ",,
"social-residence"," Residence"," ",, "social-residence"," Residence"," ",,
"social-strength"," Strength"," ",, "social-strength"," Strength"," ",,
"mother"," Mother"," ",, "mother"," Mother"," ",,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment