~mil/sxmo-tickets#393: 
No newline inserted for new contacts

Steps to repro:

  1. Open system menu > Contacts > New Contact
  2. Enter name and number

Expected result: contact is added on a new line at the end of contacts.tsv

Actual result: contact is added without a new line

  • postmarketos-ui-sxmo-1.5.1-r1
  • sxmo-utils-1.5.2.1-r0
Status
RESOLVED FIXED
Submitter
~flimflam
Assigned to
No-one
Submitted
1 year, 7 months ago
Updated
1 year, 1 month ago
Labels
No labels applied.

Hartman, Peter 1 year, 7 months ago · edit

On Fri, Oct 22, 2021 at 04:32:26PM -0000, ~flimflam wrote:

Steps to repro:

  1. Open system menu > Contacts > New Contact
  2. Enter name and number

Expected result: contact is added on a new line at the end of contacts.tsv

Actual result: contact is added without a new line

  • postmarketos-ui-sxmo-1.5.1-r1
  • sxmo-utils-1.5.2.1-r0

-- View on the web: https://todo.sr.ht/~mil/sxmo-tickets/393

should fix it?

diff --git a/scripts/core/sxmo_contactmenu.sh b/scripts/core/sxmo_contactmenu.sh index 2bd05a7..c4d87c4 100755 --- a/scripts/core/sxmo_contactmenu.sh +++ b/scripts/core/sxmo_contactmenu.sh @@ -20,7 +20,7 @@ newcontact() { done

     PICKED="$number $name" # now act like if we picked this new contact
  •   printf %s "$PICKED" >> "$CONTACTFILE"
    
  •   printf %s "$PICKED\n" >> "$CONTACTFILE"
    
    }

-- sic dicit magister P https://phartman.sites.luc.edu/ GPG keyID 0xE0DBD3D6 (CAE6 3A6F 755F 7BC3 36CA 330D B3E6 39C6 E0DB D3D6)

~phartman 1 year, 7 months ago

Sorry. Can't figure out how to edit that reply:

index 2bd05a7..c4d87c4 100755
--- a/scripts/core/sxmo_contactmenu.sh
+++ b/scripts/core/sxmo_contactmenu.sh
@@ -20,7 +20,7 @@ newcontact() {
        done

        PICKED="$number $name" # now act like if we picked this new contact
-       printf %s "$PICKED" >> "$CONTACTFILE"
+       printf %s "$PICKED\n" >> "$CONTACTFILE"
 }

 editcontactname() {

~stacyharper 1 year, 7 months ago

More printf "%s\n" "$PICKED" >> "$CONTACTFILE"

~phartman REPORTED FIXED 1 year, 1 month ago

Register here or Log in to comment, or comment via email.